Skip to content

Commit 0f71877

Browse files
committed
handle dict types in signatures
1 parent 78329b5 commit 0f71877

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

func2argparse/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ def _parse_function(func):
183183
argtype = get_args(argtype)[0]
184184
if origtype in (list, tuple):
185185
nargs = "+"
186+
elif origtype == dict:
187+
argtype = dict
186188

187189
# Override the nargs if specified in the docstring
188190
if "nargs" in argdocs[argname]:

0 commit comments

Comments
 (0)