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: