Skip to content

Commit f1dd3bd

Browse files
ambvgvanrossum
authored andcommitted
Make fast_parse able to parse real-world machine-generated code (#2766)
This is not changing the recursive nature of the visitor so it's effectively a workaround. However, this lets the parser deal with actual code in the wild, such as `idnadata.py`.
1 parent b759293 commit f1dd3bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mypy/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def main(script_path: str) -> None:
3535
bin_dir = find_bin_directory(script_path)
3636
else:
3737
bin_dir = None
38+
sys.setrecursionlimit(2 ** 14)
3839
sources, options = process_options(sys.argv[1:])
3940
serious = False
4041
try:

0 commit comments

Comments
 (0)