Skip to content

Commit

Permalink
Add regression test for no-member with empty AnnAssign (#7632)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Oct 20, 2022
1 parent 8cbc5a3 commit b051fab
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/functional/r/regression_02/regression_no_member_7631.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""Regression test from https://github.com/PyCQA/pylint/issues/7631
The following code should NOT raise no-member.
"""
# pylint: disable=missing-docstring,too-few-public-methods

class Base:
attr: int = 2

class Parent(Base):
attr: int

class Child(Parent):
attr = 2

def __init__(self):
self.attr = self.attr | 4

0 comments on commit b051fab

Please sign in to comment.