Always emit common version output if requested
Marco Ricci

Marco Ricci commited on 2025-02-15 12:05:09
Zeige 1 geänderte Dateien mit 1 Einfügungen und 2 Löschungen.


Require the caller (other version output commands) to handle the
resilient parsing case.  Duplicating this in the common version output
handler just leads to branch coverage issues.
... ...
@@ -958,8 +958,7 @@ def common_version_output(
958 958
     param: click.Parameter,
959 959
     value: bool,  # noqa: FBT001
960 960
 ) -> None:
961
-    del param
962
-    if value and not ctx.resilient_parsing:
961
+    del param, value
963 962
     major_dependencies: list[str] = []
964 963
     try:
965 964
         cryptography_version = importlib.metadata.version('cryptography')
966 965