When running pyment on a file with already existing docstrings pyment will try to add again the arguments.
Running pyment on the following file
def add(left: int, right: int) -> int:
"""
Add two intergers together.
Really high tech !
Parameters
----------
left : int :
Left element to add
right : int :
right element to add
Returns
-------
"""
return left + right
will result in this file (the bug still occurs with or without the -w arg):
def add(left: int, right: int) -> int:
"""
Add two intergers together.
Really high tech ! like woa !
Parameters
----------
left : int :
Left element to add
right : int :
right element to add
left: int :
right: int :
Returns
-------
"""
return left + right
I at first thought that pyment was hard checking for the presence of those two lines, but it does not seem to be the case :
def add(left: int, right: int) -> int:
"""
Add two intergers together.
Really high tech ! like woa !
Parameters
----------
left : int :
Left element to add
right : int :
right element to add
left : int :
right : int :
left: int :
right: int :
Returns
-------
"""
return left + right
When running
pyment
on a file with already existing docstrings pyment will try to add again the arguments.Running pyment on the following file
will result in this file (the bug still occurs with or without the
-w
arg):I at first thought that pyment was hard checking for the presence of those two lines, but it does not seem to be the case :
Tested on python 3.10.8, pyment 0.3.3