From 9be8d5dbeb1c7ecc3153b570fefc6919decf7a22 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Fri, 15 Nov 2024 12:06:10 +0100 Subject: [PATCH] pkgs/cli: Add comment to add_common_flags function --- pkgs/clan-cli/clan_cli/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/clan-cli/clan_cli/__init__.py b/pkgs/clan-cli/clan_cli/__init__.py index fd6a1be64..a1c6c150a 100644 --- a/pkgs/clan-cli/clan_cli/__init__.py +++ b/pkgs/clan-cli/clan_cli/__init__.py @@ -61,6 +61,9 @@ def add_common_flags(parser: argparse.ArgumentParser) -> None: This is needed because the aliases subcommand doesn't *really* create an alias - it duplicates the actual parser in the tree making duplication inevitable while naively traversing. + + The error that would be thrown by argparse: + - argparse.ArgumentError """ return any(arg in action.option_strings for action in parser._actions) # noqa: SLF001 -> private_member accessed