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

Google sync #1593

Merged
merged 9 commits into from
Feb 27, 2024
Merged

Google sync #1593

merged 9 commits into from
Feb 27, 2024

Conversation

rchen152
Copy link
Contributor

No description provided.

rchen152 and others added 9 commits February 27, 2024 09:45
Fixes a bug that affects typeshed's pytype_test. See
python/typeshed#11333 for context. I wasn't able to
write a test for this because it's triggered by some complicated combination of
mutually dependent pyi files and mutually recursive aliases.

PiperOrigin-RevId: 609414132
Some users seem to like creating classes that are both dataclasses for
inheritance and protocols for structural typing, so we need __match_args__ to
be present for protocol matching to work properly.

PiperOrigin-RevId: 610507303
My previous attempt to always set __match_args__ didn't work because the type
varies depending on the number of dataclass fields, so subclassing messes up
protocol matching. Instead, we can set PyTDClass.match_args from the dataclass
metadata and not set __match_args__ at all.

PiperOrigin-RevId: 610650564
PiperOrigin-RevId: 610786166
@rchen152 rchen152 merged commit 5201c54 into main Feb 27, 2024
33 of 39 checks passed
@rchen152 rchen152 deleted the google_sync branch February 27, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants