-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Remove bogus TODO added in #18585 #18603
Remove bogus TODO added in #18585 #18603
Conversation
558a8f7
to
ff7105b
Compare
This comment has been minimized.
This comment has been minimized.
0a4695d
to
a3bd40f
Compare
This comment has been minimized.
This comment has been minimized.
Oh, sorry, I completely forgot about one important case where fallbacks can't be ignored: tuple subclasses. For example when one does: class C(tuple[int, str]):
... we must put |
I think you can repurpose this PR to simply remove the TODO comment. |
This comment has been minimized.
This comment has been minimized.
How does/can that manifest and why aren't any testcases failing? |
First, all user-defined tuple types get patched in-place after semantic analysis (see |
Diff from mypy_primer, showing the effect of this PR on open source code: freqtrade (https://github.com/freqtrade/freqtrade): 1.94x slower (131.3s -> 254.1s in a single noisy sample)
|
Removes todo added in #18585 - such normalization is not technically correct when a tuple is used as a base class.