Skip to content

Commit b051fab

Browse files
committed
Add regression test for no-member with empty AnnAssign (#7632)
1 parent 8cbc5a3 commit b051fab

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""Regression test from https://github.com/PyCQA/pylint/issues/7631
2+
The following code should NOT raise no-member.
3+
"""
4+
# pylint: disable=missing-docstring,too-few-public-methods
5+
6+
class Base:
7+
attr: int = 2
8+
9+
class Parent(Base):
10+
attr: int
11+
12+
class Child(Parent):
13+
attr = 2
14+
15+
def __init__(self):
16+
self.attr = self.attr | 4

0 commit comments

Comments
 (0)