Skip to content

Commit

Permalink
more hack
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jul 2, 2023
1 parent c3e4e25 commit 9dd794b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,12 @@ def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
for mod in mods:
if mod in sys.modules:
del sys.modules[mod]
shutil.rmtree(out_dir)

# We run into a RecursionError on Windows
# https://github.com/python/cpython/issues/79325
# So just avoid cleaning up the temporary directory on CI
if sys.platform != "win32" or "GITHUB_ACTION" not in os.environ:
shutil.rmtree(out_dir)

def parse_flags(self, program_text: str, extra: list[str]) -> Options:
flags = re.search("# flags: (.*)$", program_text, flags=re.MULTILINE)
Expand Down

0 comments on commit 9dd794b

Please sign in to comment.