Closed dadadel closed 3 years ago
When a function has parameters with default values that are list, dictionary or tuple, Pyment will just consider several parameters splitting on coma.
The following python code:
def func1(param1=[1, None, "hehe"]): pass def func2(param1=(1, None, "hehe")): pass def func3(param1={0: 1, "a": None}): pass
Will produce the patch:
# Patch generated by Pyment v0.3.2-dev4 --- a/issue46.py +++ b/issue46.py @@ -1,9 +1,29 @@ def func1(param1=[1, None, "hehe"]): + """ + + :param param1: (Default value = [1) + :param None: + :param "hehe"]: + + """ pass def func2(param1=(1, None, "hehe")): + """ + + :param param1: (Default value = (1) + :param None: + :param "hehe": + + """ pass def func3(param1={0: 1, "a": None}): + """ + + :param param1: (Default value = {0: 1) + :param "a": None}: + + """ pass
PR #96 fixes this issue.
When a function has parameters with default values that are list, dictionary or tuple, Pyment will just consider several parameters splitting on coma.
The following python code:
Will produce the patch: