Ignore multi-line calls in duplicate detection (R0801) #7920
Labels
duplicate-code
Related to code duplication checker
Enhancement ✨
Improvement to a component
Needs decision 🔒
Needs a decision before implemention or rejection
Uh oh!
There was an error while loading. Please reload this page.
Current problem
When I run PyLint on my code base, which contains many multi-line function calls like this:
PyLint complains over duplicate code:
Note that while this call spans multiple lines, it is only a single statement. Maybe single statements should never be considered duplicates, as they might just be the canonical form? Maybe
--ignore-multiline-statements
would be a sensible name.Desired solution
I would like PyLint to detect these multi-line duplicates as okay, since they are the canonical way of calling these functions in my style of formatting the code.
Additional context
@Pierre-Sassoulas suggested introducing an option like
--ignore-multiline-calls
(like other similarities checker options https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html#similarities-checker) here: #214 (comment)The text was updated successfully, but these errors were encountered: