Add __slots__ to third-party packages using stubdefaulter#14619
Merged
JelleZijlstra merged 7 commits intopython:mainfrom Aug 21, 2025
Merged
Add __slots__ to third-party packages using stubdefaulter#14619JelleZijlstra merged 7 commits intopython:mainfrom
JelleZijlstra merged 7 commits intopython:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
AlexWaygood
approved these changes
Aug 21, 2025
This comment has been minimized.
This comment has been minimized.
These protobuf objects generally have empty __slots__ but their fields can be assigned to. Haven't figured out exactly how they do this but presumably they have some separate storage area. Adding __slots__ causes false positives, so let's drop these slots.
This comment has been minimized.
This comment has been minimized.
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Avasam
added a commit
that referenced
this pull request
Nov 2, 2025
- New https://docs.astral.sh/ruff/settings/#lint_future-annotations setting for our scripts - `FURB`: I blindly added out of preview rules. We need to validate if there's any we don't want. - `PYI`: Added rules that didn't have autofixes before and which we don't already noqa anywhere. - `SIM117`'s autofix is out of preview, but as per #13309 we weren't sure whether we wanted to apply it all the time. - `SIM905`: New rule, I think we'd always want it. - `PLC0205`: I moved that one to stubs-only ignore (was added in #14619 by @JelleZijlstra ).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.