You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[skip]
tst.py:16:15: E1101: Instance of '_CountingAttr' has no 'a_method' member (no-member)
[skip]
tst.py:19:24: E1135: Value 'self.values' doesn't support membership test (unsupported-membership-test)
tst.py:13:15: E1101: Instance of '_CountingAttr' has no 'a_method' member (no-member)
Expected behavior
Line 13 (class D1) should not raise no-member & unsupported-membership-test warnings.
@danie1k Thanks for reporting the issue. Right now pylint does not understand any typing support for attrs. For each library that does things somewhat in a dynamic way, in which bucket attrs falls as well, we have to write custom inference transforms . You are seeing these issues because no one got to add support for attrib defaults just yet.
This issue seems to be similar/continuation to #628.
pylint
misunderstood typing when usingattr.ib(default=...)
.I've tried
typing.cast
& attr.ib withtype
attr and the result is the same.Tested on
Steps to reproduce
pylint tst.py
.Current behavior
Expected behavior
Line 13 (class
D1
) should not raiseno-member
&unsupported-membership-test
warnings.python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
outputThe text was updated successfully, but these errors were encountered: