Add missing type hints

This commit is contained in:
daniele 2025-03-30 15:02:04 +02:00
parent 67dbb49a67
commit 57613649c2
Signed by: fuxino
GPG Key ID: 981A2B2A3BBF5514

View File

@ -601,7 +601,7 @@ class Backup:
return 0
def _parse_arguments():
def _parse_arguments() -> argparse.Namespace:
euid = os.geteuid()
if euid == 0:
@ -644,7 +644,7 @@ def _parse_arguments():
return args
def _expand_inputs(inputs, user=None):
def _expand_inputs(inputs, user: Optional[str] = None):
expanded_inputs = []
for i in inputs:
@ -667,7 +667,7 @@ def _expand_inputs(inputs, user=None):
return expanded_inputs
def _read_config(config_file, user=None):
def _read_config(config_file, user: Optional[str] = None):
config_args = {'inputs': None,
'output': None,
'exclude': None,
@ -762,7 +762,7 @@ def _read_config(config_file, user=None):
return config_args
def _notify(text):
def _notify(text: str) -> None:
euid = os.geteuid()
if euid == 0:
@ -783,7 +783,7 @@ def _notify(text):
os.seteuid(int(euid))
def simple_backup():
def simple_backup() -> int:
"""Main"""
args = _parse_arguments()