Skip to content

Commit

Permalink
Call atexit.register correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dotboris committed Dec 7, 2023
1 parent 1ffaeaa commit 754e98f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coveo_stew/ci/mypy_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def _mypy_config_path(self) -> Optional[Path]:
return None

if self.set_config is True:
config_ref = importlib_resources.files("coveo_stew") / "package_resources/mypy.ini"
stack = ExitStack()
atexit.register(stack)
atexit.register(stack.close)
config_ref = importlib_resources.files("coveo_stew") / "package_resources/mypy.ini"
config_path = stack.enter_context(importlib_resources.as_file(config_ref))
return config_path

Expand Down

0 comments on commit 754e98f

Please sign in to comment.