False positive for keyword-arg-before-vararg
with positional-only
parameter
#8570
Labels
False Positive 🦟
A message is emitted but nothing is wrong with the code
Milestone
Bug description
keyword-arg-before-vararg
is emitted by Pylint for the followinga.py
where we have a positional-only parameter with a default value followed by*args
:This is a false positive because the
keyword-arg-before-vararg
checker exists to warn us about function signatures that can lead toTypeError: name() got multiple values for argument "param1"
when this function would be called with the intention of passing an arbitrary number of *args together with a keyword-argument forparam1
.However, in this case, we have the following, since it isn't possible to pass a positional-only parameter as a keyword anyway:
I propose suppressing the warning in this situation.
For further context on
keyword-arg-before-vararg
see comment.Configuration
No response
Command used
Pylint output
Expected behavior
No warning is emitted.
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: