We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7a3dd4 commit 9f6261cCopy full SHA for 9f6261c
src/argsubparse/argsubparse.py
@@ -70,6 +70,11 @@ def create_subparser(
70
continue
71
if v.default is inspect._empty:
72
arg_name = (k,)
73
+ if isinstance(v.annotation, bool):
74
+ if v.default is not inspect._empty:
75
+ arg_params["action"] = "store_false" if v.default else "store_true"
76
+ else:
77
+ arg_params["action"] = "store_true"
78
else:
79
arg_params["default"] = v.default
80
short_option = short_options.get(k)
0 commit comments