Closed
Description
Steps to reproduce
A class which doesn't have __init__
(it may set attributes in __new__
, for example) will yield no-member when instance attributes are accessed.
I tried to resolve it with PEP 526 instance var annotations which don't have assignment (i.e. type only), but still get no-member error.
class Foo:
bar: int
...
x = Foo()
x.bar
Current behavior
E1101: Instance of 'Foo' has no 'bar' member (no-member)
Expected behavior
no warnings
pylint --version output
pylint 2.3.1
astroid 2.3.0
Python 3.7.0b3 (default, Aug 25 2018, 16:41:39)
[Clang 9.0.0 (clang-900.0.39.2)]