From 57613649c2eb19c7bfd70fa3e8fd3702aa6ed822 Mon Sep 17 00:00:00 2001 From: Fuxino Date: Sun, 30 Mar 2025 15:02:04 +0200 Subject: [PATCH] Add missing type hints --- simple_backup/simple_backup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/simple_backup/simple_backup.py b/simple_backup/simple_backup.py index 6b2f5f2..0b85783 100755 --- a/simple_backup/simple_backup.py +++ b/simple_backup/simple_backup.py @@ -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()