mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Fix another crash scenario on recursive tuple types

Open ilevkivskyi opened this issue 1 year ago • 1 comments

Fixes https://github.com/python/mypy/issues/17691

This looks quite ad-hoc, but the only clean alternative is to remove the existing recursive types optimization we have in subtypes.py. But the best I can get without that optimization is -7% performance penalty (on self-check). So I think it is not worth it, since it is still a corner case.

cc @JukkaL

ilevkivskyi avatar Aug 23 '24 22:08 ilevkivskyi

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

github-actions[bot] avatar Aug 23 '24 22:08 github-actions[bot]