PLE0237 unaware of properties with setter
mal opened this issue · comments
Mal Graty commented
Keywords: PLE0237
, setter
, property
class Foo:
__slots__ = ('bar',)
def __init__(self):
self.qux = 2
@property
def qux(self):
return self.bar * 2
@qux.setter
def qux(self, value):
self.bar = value / 2
$ ruff --version
ruff 0.4.4
$ ruff check --isolated --extend-select PLE0237 .
foo.py:5:9: PLE0237 Attribute `qux` is not defined in class's `__slots__`
Found 1 error.
Charlie Marsh commented
Thanks, looks like a bug.