implement explicit Optional type hints for =None parameters
Thanks https://github.com/hauntsaninja/no_implicit_optional
This commit is contained in:
parent
669c82a10b
commit
82a87e7ea9
15 changed files with 34 additions and 27 deletions
|
@ -174,7 +174,7 @@ def parse_file(config_file: str, base: dict = CONFIG_DEFAULTS) -> dict:
|
|||
class ConfigLoadException(Exception):
|
||||
inner = None
|
||||
|
||||
def __init__(self, extra_msg='', inner_exception: Exception = None):
|
||||
def __init__(self, extra_msg='', inner_exception: Optional[Exception] = None):
|
||||
msg: list[str] = ['Config load failed!']
|
||||
if extra_msg:
|
||||
msg.append(extra_msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue