-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
mypy generates __match_args__
for dataclasses and NamedTuple
s on Python <3.10
#12489
Comments
This is probably a good issue for someone new to mypy. |
I am new to mypy and I would like to work on this. I search the code above but was unable to find it. Can someone tells me where should I look at it? |
I haven't looked at the code in depth, but that looks promising! Pattern-matching support was added in #10191 — if you do a CTRL-F for "dataclasses" and "NamedTuple" in the files-changed tab for that PR, you should be able to find the bits of code that need to be changed 🙂 |
Hi, there I am wondering if I can work on this one? |
…on-version < 3.10 (python#12503) Fixes python#12489
Bug Report
Not a big deal, but mypy appears to generate
__match_args__
for dataclasses andNamedTuple
s even when running with--python-version
set to 3.9:Expected Behavior
Mypy should not autogenerate
__match_args__
when running with--python-version
set to <3.10, as pattern-matching is new in 3.10.Your Environment
0.950+dev.a33d2353a81d075850a487f3913720037f2473aa (compiled: no)
--python-version 3.9
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: