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

Exclude private attributes from override checks #16464

Merged
merged 4 commits into from
Nov 12, 2023

Conversation

ilevkivskyi
Copy link
Member

Fixes #9910
Fixes #16452

We already exclude private names from override type compatibility checks etc., but it looks like some override checks were still performed, we need to skip them, since private name is actually a different name in subclass.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one comment

test-data/unit/check-functions.test Outdated Show resolved Hide resolved
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit 8f3fe7c into python:master Nov 12, 2023
18 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-private branch November 12, 2023 09:54
JukkaL pushed a commit that referenced this pull request Nov 22, 2023
Fixes #9910
Fixes #16452

We already exclude private names from override type compatibility checks
etc., but it looks like some override checks were still performed, we
need to skip them, since private name is actually a different name in
subclass.

---------

Co-authored-by: Alex Waygood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants