Skip to content

Do not generate __match_args__ when running with --python-version < 3.10 - #12503

Merged
JukkaL merged 1 commit into
python:masterfrom
stkrizh:match-args-old-python-versions
Jul 8, 2022
Merged

Do not generate __match_args__ when running with --python-version < 3.10#12503
JukkaL merged 1 commit into
python:masterfrom
stkrizh:match-args-old-python-versions

Conversation

@stkrizh

Copy link
Copy Markdown
Contributor

Description

This PR removes autogeneration of __match_args__ attribute for dataclasses and named tuples when running with --python-version set to < 3.10

Fixes#12489

@github-actions

This comment has been minimized.

@JukkaL

Copy link
Copy Markdown
Collaborator

@stkrizh This looks good, and should be ready to land once there are no merge conflicts. (And sorry for the slow review!)

@stkrizh

Copy link
Copy Markdown
ContributorAuthor

@JukkaL Thank you, no problem. I will update the PR soon.

@stkrizh
stkrizhforce-pushed the match-args-old-python-versions branch from 3eed98a to 5024752CompareJune 15, 2022 18:41
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygoodAlexWaygood mentioned this pull request Jul 8, 2022
@JukkaL
JukkaL merged commit 49b4b3d into python:masterJul 8, 2022
Gobot1234 pushed a commit to Gobot1234/mypy that referenced this pull request Aug 12, 2022
Sign up for freeto 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.

mypy generates __match_args__ for dataclasses and NamedTuples on Python <3.10

2 participants

@stkrizh@JukkaL