diff --git a/features/steps/git_worktree_toctou_race_fix_steps.py b/features/steps/git_worktree_toctou_race_fix_steps.py index 3836fddab..d6b72d2d1 100644 --- a/features/steps/git_worktree_toctou_race_fix_steps.py +++ b/features/steps/git_worktree_toctou_race_fix_steps.py @@ -81,9 +81,7 @@ def step_gwt_toctou_saved_exists(ctx: Context, label: str) -> None: ) -@then( - 'the gwt toctou saved sandbox paths "{a}" and "{b}" should differ' -) +@then('the gwt toctou saved sandbox paths "{a}" and "{b}" should differ') def step_gwt_toctou_saved_differ(ctx: Context, a: str, b: str) -> None: saved = _ensure_saved_sandboxes(ctx) path_a = saved[a].context.sandbox_path diff --git a/src/cleveragents/infrastructure/sandbox/git_worktree.py b/src/cleveragents/infrastructure/sandbox/git_worktree.py index 2c864be0b..3974679b8 100644 --- a/src/cleveragents/infrastructure/sandbox/git_worktree.py +++ b/src/cleveragents/infrastructure/sandbox/git_worktree.py @@ -719,9 +719,7 @@ class GitWorktreeSandbox: shutil.rmtree(self._worktree_path, ignore_errors=True) # Remove the parent temporary directory - if self._parent_temp_dir is not None and os.path.exists( - self._parent_temp_dir - ): + if self._parent_temp_dir is not None and os.path.exists(self._parent_temp_dir): try: shutil.rmtree(self._parent_temp_dir, ignore_errors=False) logger.debug(