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
Hi, we encountered the issue in our CI which runs a pylint -E. The issue does not happen in non-slotted classes, as far as I am aware.
Run pylint -E on the following file:
class TestClass: __slots__ = ['_i'] def __init__(self): self._i = 0 @property def i(self): return self._i @i.setter def i(self, v): self._i = v other = i instance = TestClass() instance.other = 42 print(instance.i)
************* Module test test.py:17:0: E0237: Assigning to attribute 'other' not defined in class slots (assigning-non-slot)
(and other errors in the code using that class)
No error
pylint 2.1.1 astroid 2.0.4 Python 3.7.0 (default, Jul 15 2018, 10:44:58) [GCC 8.1.1 20180531]
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue! I can confirm the bug, pylint in this case is not taking in account the class level other attribute.
other
Sorry, something went wrong.
Disable the pylint CI test until upstream's bug is fixed
791d44f
See pylint-dev/pylint#2439
1688894
No branches or pull requests
Hi, we encountered the issue in our CI which runs a pylint -E.
The issue does not happen in non-slotted classes, as far as I am aware.
Steps to reproduce
Run pylint -E on the following file:
Current behavior
(and other errors in the code using that class)
Expected behavior
No error
pylint --version output
The text was updated successfully, but these errors were encountered: