mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-06 08:46:21 +01:00
Updated for typing
This commit is contained in:
parent
776ffc805a
commit
48f45e7709
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ class Downloader(Configs):
|
||||||
def __init__(self, path: Union[str, Path], urls: list, flags: list):
|
def __init__(self, path: Union[str, Path], urls: list, flags: list):
|
||||||
__slots__ = 'path', 'urls', 'flags'
|
__slots__ = 'path', 'urls', 'flags'
|
||||||
super(Configs, self).__init__()
|
super(Configs, self).__init__()
|
||||||
self.path = path
|
self.path: Path = path
|
||||||
self.urls: list = urls
|
self.urls: list = urls
|
||||||
self.flags: list = flags
|
self.flags: list = flags
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ class Downloader(Configs):
|
||||||
""" Checks if the file downloaded. """
|
""" Checks if the file downloaded. """
|
||||||
url: str = unquote(url)
|
url: str = unquote(url)
|
||||||
file: str = url.split('/')[-1]
|
file: str = url.split('/')[-1]
|
||||||
path_file = Path(self.path, file)
|
path_file: Path = Path(self.path, file)
|
||||||
|
|
||||||
if not path_file.exists():
|
if not path_file.exists():
|
||||||
self.errors.raise_error_message(f"Download the '{file}' file")
|
self.errors.raise_error_message(f"Download the '{file}' file")
|
||||||
|
|
Loading…
Add table
Reference in a new issue