-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False Negative: Decorator signatures are unverified #1225
Comments
Closing as duplicate. |
@PCManticore I took a closer look at it, and this is not actually checked with function composition either, so it is less related to #259 than I thought. def dec(func):
def wrap():
return func('test')
return wrap
def simple():
return 'test'
hard = dec(simple)
hard() Boiling it down further illustrates the difference. def call(func):
return func('test')
def simple():
return 'test'
call(simple) This code is guaranteed to error, but pylint doesn't report any errors. |
This looks like an example of pylint-dev/astroid#177. This, combined with lack of flow control understanding across the inference, plus lack of understanding decorators, that stem from the first two points, results in the problems you are noticing. We know about it, it's not trivial to fix, but it's on our roadmap. |
Steps to reproduce
Current behavior
Pylint does not detect any errors.
Expected behavior
Pylint should detect that
func
is called with too many arguments.pylint --version output
Related issues
#259
The text was updated successfully, but these errors were encountered: