From 59e69c1d68f6e1c92e3ea34433ceeb1a2c83b94d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 12 Oct 2026 13:09:09 +0500 Subject: use contextlib.chdir --- project/utils.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'project/utils.py') diff --git a/project/utils.py b/project/utils.py index 87ac8d1..d3a9b10 100644 --- a/project/utils.py +++ b/project/utils.py @@ -77,16 +77,6 @@ def setup_logging(verbose=False): sys.exit(1) -@contextmanager -def cd(path): - cwd = os.getcwd() - os.chdir(path) - try: - yield - finally: - os.chdir(cwd) - - def run(cmd, **kwargs): logging.info("Running: %s", shlex.join(cmd)) return subprocess.run(cmd, check=True, **kwargs) -- cgit v1.3