From e6ef721b1354978015c5915463834e39adf7f9f8 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 27 Apr 2023 22:54:22 +0300 Subject: [PATCH] Updated for type hints --- slpkg/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 07010416..2217183d 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -8,7 +8,7 @@ import fnmatch import logging import subprocess from pathlib import Path -from typing import Generator, Union +from typing import Generator from slpkg.configs import Configs from slpkg.blacklist import Blacklist @@ -127,7 +127,7 @@ class Utilities(Configs): self.__class__.read_packages_from_file.__name__) self.errors.raise_error_message(f"No such file or directory: '{file}'", exit_status=20) - def read_file(self, file: Union[str, Path]) -> list: + def read_file(self, file: Path) -> list: """ Reads the text file. """ try: with open(file, 'r', encoding='utf-8', errors='replace') as f: