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
"""test_lint.py""" from typing import Optional class Foo: """class Foo""" a: Optional[dict] = None def empty(self): """foo""" @classmethod def init(cls): """init""" if cls.a is None: cls.a = {} assert cls.a is not None assert isinstance(cls.a, dict) if cls.a is None: return cls.a[1] = 2 _ = cls.a[1] _ = 1 in cls.a
No response
pylint test_lint.py
************* Module test_lint test_lint.py:19:8: E1137: 'cls.a' does not support item assignment (unsupported-assignment-operation) test_lint.py:20:12: E1136: Value 'cls.a' is unsubscriptable (unsubscriptable-object) test_lint.py:21:19: E1135: Value 'cls.a' doesn't support membership test (unsupported-membership-test) ------------------------------------------------------------------ Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
All above errors should not be triggered by cls.a
cls.a
pylint 3.2.5 astroid 3.2.2 Python 3.12.4 (main, Jun 6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)]
MacOS with homebrew
The text was updated successfully, but these errors were encountered:
duplicate with #9515
=====
well not exactly duplicate, since it does not fall into "but we should add one for boolean tests." situation.
Sorry, something went wrong.
No branches or pull requests
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
All above errors should not be triggered by
cls.a
Pylint version
OS / Environment
MacOS with homebrew
Additional dependencies
The text was updated successfully, but these errors were encountered: