From e9b44e05af084f6c96b575b6f83083bec4837610 Mon Sep 17 00:00:00 2001 From: Athitheya Gobinathan Date: Sun, 16 Jun 2024 19:29:26 -0400 Subject: [PATCH] refactor: specify arg type --- middleware/decrypt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleware/decrypt.py b/middleware/decrypt.py index 9b8c5be..1d37c50 100644 --- a/middleware/decrypt.py +++ b/middleware/decrypt.py @@ -75,7 +75,7 @@ def move_files(file_paths: list[Path], output_path: Path) -> None: if __name__ == "__main__": parser = ArgumentParser() - parser.add_argument("file_paths", nargs='+') + parser.add_argument("file_paths", nargs='+', type=Path) parser.add_argument( "--output-dir", required=True, @@ -84,7 +84,7 @@ def move_files(file_paths: list[Path], output_path: Path) -> None: args = parser.parse_args() output_dir = Path(args.output_dir) - paths = [Path(path) for path in args.file_paths] + paths = args.file_paths keys = get_private_keys(paths) decrypt_files(paths, keys, output_dir) move_files(paths, output_dir)