You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defexample_func(
arg1,
arg2,
arg3,
arg4,
):
"""Valid function definition with docstring only."""
b.py:
defexample_func(
arg1,
arg2,
arg3,
arg4,
):
"""Valid function definition with docstring only."""
Current behavior
Result of pylint --disable=all --enable=similarities --ignore-signatures=yes module:
************* Module module.b
module/b.py:1:0: R0801: Similar lines in 2 files
==module.a:0
==module.b:0
def example_func(
arg1,
arg2,
arg3,
arg4,
):
"""Valid function definition with docstring only.""" (duplicate-code)
-----------------------------------
Your code has been rated at 5.00/10
Expected behavior
duplicate-code error shouldn't be reported in this case.
Note: if functions have bodies everything works correctly. You could add pass to the example functions above and no duplicate-code error would be reported.
mhumetskyi
changed the title
Similarities false negative with "ignore-signatures" option enabled and functions with docstring-only bodies
Similarities checker with "ignore-signatures" option enabled ignores functions with docstring-only bodies
Jul 4, 2021
#4648 follow-up.
Steps to reproduce
Given multiple files:
a.py
:b.py
:Current behavior
Result of
pylint --disable=all --enable=similarities --ignore-signatures=yes module
:Expected behavior
duplicate-code
error shouldn't be reported in this case.Note: if functions have bodies everything works correctly. You could add
pass
to the example functions above and noduplicate-code
error would be reported.pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: