Skip to content

Add __match_args__ to dataclasses with no fields - #15749

Merged
hauntsaninja merged 2 commits into
python:masterfrom
hamdanal:dataclass-matchargs
Jul 22, 2023
Merged

Add __match_args__ to dataclasses with no fields #15749
hauntsaninja merged 2 commits into
python:masterfrom
hamdanal:dataclass-matchargs

Conversation

@hamdanal

Copy link
Copy Markdown
Collaborator

It exists at runtime.

Fixes#15748

@AlexWaygoodAlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actions

Copy link
Copy Markdown
Contributor

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

@hauntsaninjahauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@hauntsaninja
hauntsaninja merged commit d2022a0 into python:masterJul 22, 2023
@hamdanal
hamdanal deleted the dataclass-matchargs branch July 23, 2023 06:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-dataclassestopic-match-statementPython 3.10's match statement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

__match_args__ is not added to dataclasses with no fields

3 participants

@hamdanal@hauntsaninja@AlexWaygood