Skip to content

Commit 779dbdd

Browse files
committed
bugfix on required arg with bool values
1 parent aa82f16 commit 779dbdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyargwriter/utils/casts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def dict2args(d: Dict[str, Any]) -> str:
5555
result += f"{key} = {value}, "
5656

5757
# make required argument if there is no default given in the argument dictionary
58-
if "default" not in d.keys():
58+
if "default" not in d.keys() and d["type"] != "bool":
5959
result += "required = True, "
6060
else:
6161
result += "required = False, "

0 commit comments

Comments
 (0)