We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$ cat /tmp/test.py class Class: def method(self): print(__class__) Class().method() $ pylint --rcfile=/dev/null /tmp/test.py ************* Module test C: 1, 0: Missing module docstring (missing-docstring) C: 1, 0: Missing class docstring (missing-docstring) C: 2, 4: Missing method docstring (missing-docstring) E: 3,14: Undefined variable '__class__' (undefined-variable) R: 2, 4: Method could be a function (no-self-use) R: 1, 0: Too few public methods (1/2) (too-few-public-methods) ---------------------------------------------------------------------- Your code has been rated at -15.00/10 (previous run: -15.00/10, +0.00)
pylint thinks __class__ is undefined.
__class__
__class__ is actually defined (on Py3) and set to the containing class.
No config file found, using default configuration pylint 2.0.0, astroid 1.5.0 Python 3.6.0 (default, Jan 16 2017, 12:12:55) [GCC 6.3.1 20170109]
The text was updated successfully, but these errors were encountered:
Thanks for reporting a bug!
Sorry, something went wrong.
Thank you. I didn't know this.
pylint-dev/astroid@ced3d9d
Dunder class at method level is now inferred as the class of the method
4a529ba
Close pylint-dev/pylint#1328
No branches or pull requests
Steps to reproduce
Current behavior
pylint thinks
__class__
is undefined.Expected behavior
__class__
is actually defined (on Py3) and set to the containing class.pylint --version output
The text was updated successfully, but these errors were encountered: