-
-
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
Type changes in decorators are not detected #2578
Comments
Thanks for creating an issue! pylint doesn't currently correctly understand decorators, which is why it does not infer the new type. |
Is there any roadmap towards this? |
No, there isn't. pylint is a volunteer driven project and the roadmap tends to be the things that volunteers are mostly interested in working on. For now this is not a priority but hopefully we'll get to it at some point. |
I understand. Is there already any discussion about this or is this issue the right place to start one? |
This is the right place to start one. :) |
A lot of similar issues were listed in #8332 |
When a decorator changes the return type of a function, that change is not detected.
Steps to reproduce
Current behavior
Return type of decorated function is set by the function declaration
Expected behavior
Return type of the function set by decorator
pylint --version output
pylint 2.1.1
astroid 2.0.4
Python 3.6.5 (default, May 14 2018, 11:01:09)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]
The text was updated successfully, but these errors were encountered: