mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-05 08:46:20 +01:00
Updated for type hints
This commit is contained in:
parent
e5f549b900
commit
e6ef721b13
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue