mypy
mypy copied to clipboard
Initial attempt at fixing issue-17706
Fixes #17706
Handles recursion error during parse of too complex expressions, differentiates from internal recursion errors by attempting to unparse the ast. If builtin ast.unparse fails, then the error is ignored. Otherwise, re-raises.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅