Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regression test for no-member with empty AnnAssign #7632

Merged
merged 2 commits into from Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Expand Up @@ -191,7 +191,7 @@ jobs:
run: >-
echo "key=venv-${{ env.CACHE_VERSION }}-${{
hashFiles('setup.cfg', 'requirements_test_min.txt')
}}" >> $GITHUB_OUTPUT
}}" >> $env:GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
Expand Down
16 changes: 16 additions & 0 deletions tests/functional/r/regression_02/regression_no_member_7631.py
@@ -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