From 692c4a48a4b87fecfe172d852993268418dc9861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Sun, 14 Jul 2024 19:07:36 +0200 Subject: [PATCH 1/2] The preset takes the advantage to the cli --- scan_to_paperless/scan.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scan_to_paperless/scan.py b/scan_to_paperless/scan.py index a71938ab..bd63e257 100755 --- a/scan_to_paperless/scan.py +++ b/scan_to_paperless/scan.py @@ -195,14 +195,11 @@ def main() -> None: else: call(scanimage) - args_: schema.Arguments = {} + args_: schema.Arguments = { + "append_credit_card": args.append_credit_card, + "assisted_split": args.assisted_split, + } args_.update(config.get("default_args", {})) - args_cmd = dict(args._get_kwargs()) # pylint: disable=protected-access - del args_cmd["mode"] - del args_cmd["preset"] - del args_cmd["config"] - del args_cmd["set_config"] - args_.update(cast(schema.Arguments, args_cmd)) except subprocess.CalledProcessError as exception: print(exception) From 8a7402d41d4eb0ff02fc6fcd00f48f755417add8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Sun, 14 Jul 2024 19:26:04 +0200 Subject: [PATCH 2/2] Fix package check --- ci/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/requirements.txt b/ci/requirements.txt index 105aa8c6..98e9832a 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -6,3 +6,4 @@ poetry-plugin-export==1.8.0 pip==24.0 pre-commit==3.7.1 poetry-plugin-drop-python-upper-constraint==0.1.0 +importlib-metadata<8.0.0