False positive for unexpected-keyword-arg
for decorators with inner inner function
#5784
Labels
Decorators
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Bug description
Just tried this out with the latest version of the main branch (any version after bfeca4c) and there seems to be a case where #5547 is still raising a false positive unexpected-keyword-arg error.
(Note that no error is raised by pylint if we remove the top-level function (
example_decorator
). The reason for someone to define the decorator this way is so that it's possible to use the bare@example_decorator
, as well as with arguments@example_decorator(foo=1)
.)Using pylint on commit hash e75e37a, this is the error that's printed out:
Calling
example_func
works fine:Command used
Pylint output
Expected behavior
No
unexpected-keyword-arg
error raisedPylint version
The text was updated successfully, but these errors were encountered: