From a2e85a7002680075b5aba9c3623eab4fd6213cb1 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Sun, 4 Dec 2022 11:20:44 -0500 Subject: [PATCH] Add type-hints --- core/auto_process/books.py | 16 ++++++++-------- core/auto_process/comics.py | 16 ++++++++-------- core/auto_process/games.py | 16 ++++++++-------- core/auto_process/movies.py | 16 ++++++++-------- core/auto_process/music.py | 16 ++++++++-------- core/auto_process/tv.py | 16 ++++++++-------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/core/auto_process/books.py b/core/auto_process/books.py index 2c7428e0..5fc5518e 100644 --- a/core/auto_process/books.py +++ b/core/auto_process/books.py @@ -36,15 +36,15 @@ requests.packages.urllib3.disable_warnings() def process( - section, - dir_name, - input_name=None, + section: core.configuration.Section, + dir_name: str, + input_name: str = '', status: int = 0, - failed=False, - client_agent='manual', - download_id='', - input_category=None, - failure_link=None, + failed: bool = False, + client_agent: str = 'manual', + download_id: str = '', + input_category: str = '', + failure_link: str = '', ) -> ProcessResult: cfg = dict(core.CFG[section][input_category]) diff --git a/core/auto_process/comics.py b/core/auto_process/comics.py index f04daa6a..6dd0537c 100644 --- a/core/auto_process/comics.py +++ b/core/auto_process/comics.py @@ -36,15 +36,15 @@ requests.packages.urllib3.disable_warnings() def process( - section, - dir_name, - input_name=None, + section: core.configuration.Section, + dir_name: str, + input_name: str = '', status: int = 0, - failed=False, - client_agent='manual', - download_id='', - input_category=None, - failure_link=None, + failed: bool = False, + client_agent: str = 'manual', + download_id: str = '', + input_category: str = '', + failure_link: str = '', ) -> ProcessResult: apc_version = '2.04' comicrn_version = '1.01' diff --git a/core/auto_process/games.py b/core/auto_process/games.py index 21224c27..59f13ba6 100644 --- a/core/auto_process/games.py +++ b/core/auto_process/games.py @@ -36,15 +36,15 @@ requests.packages.urllib3.disable_warnings() def process( - section, - dir_name, - input_name=None, + section: core.configuration.Section, + dir_name: str, + input_name: str = '', status: int = 0, - failed=False, - client_agent='manual', - download_id='', - input_category=None, - failure_link=None, + failed: bool = False, + client_agent: str = 'manual', + download_id: str = '', + input_category: str = '', + failure_link: str = '', ) -> ProcessResult: cfg = dict(core.CFG[section][input_category]) diff --git a/core/auto_process/movies.py b/core/auto_process/movies.py index bc07f4fd..ccbb283a 100644 --- a/core/auto_process/movies.py +++ b/core/auto_process/movies.py @@ -36,15 +36,15 @@ requests.packages.urllib3.disable_warnings() def process( - section, - dir_name, - input_name=None, + section: core.configuration.Section, + dir_name: str, + input_name: str = '', status: int = 0, - failed=False, - client_agent='manual', - download_id='', - input_category=None, - failure_link=None, + failed: bool = False, + client_agent: str = 'manual', + download_id: str = '', + input_category: str = '', + failure_link: str = '', ) -> ProcessResult: cfg = dict(core.CFG[section][input_category]) diff --git a/core/auto_process/music.py b/core/auto_process/music.py index 971d03ed..d985601d 100644 --- a/core/auto_process/music.py +++ b/core/auto_process/music.py @@ -36,15 +36,15 @@ requests.packages.urllib3.disable_warnings() def process( - section, - dir_name, - input_name=None, + section: core.configuration.Section, + dir_name: str, + input_name: str = '', status: int = 0, - failed=False, - client_agent='manual', - download_id='', - input_category=None, - failure_link=None, + failed: bool = False, + client_agent: str = 'manual', + download_id: str = '', + input_category: str = '', + failure_link: str = '', ) -> ProcessResult: cfg = dict(core.CFG[section][input_category]) diff --git a/core/auto_process/tv.py b/core/auto_process/tv.py index 71286cf4..86963a79 100644 --- a/core/auto_process/tv.py +++ b/core/auto_process/tv.py @@ -36,15 +36,15 @@ requests.packages.urllib3.disable_warnings() def process( - section, - dir_name, - input_name=None, + section: core.configuration.Section, + dir_name: str, + input_name: str = '', status: int = 0, - failed=False, - client_agent='manual', - download_id='', - input_category=None, - failure_link=None, + failed: bool = False, + client_agent: str = 'manual', + download_id: str = '', + input_category: str = '', + failure_link: str = '', ) -> ProcessResult: cfg = dict(core.CFG[section][input_category])