From f8ea231a7a1d3573fb3d0bf26a636183cb8d6a21 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:39:22 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/spikeinterface/preprocessing/motion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spikeinterface/preprocessing/motion.py b/src/spikeinterface/preprocessing/motion.py index a98bdc171a..71ae3f3ebb 100644 --- a/src/spikeinterface/preprocessing/motion.py +++ b/src/spikeinterface/preprocessing/motion.py @@ -320,8 +320,9 @@ def correct_motion( if folder is not None: folder = Path(folder) if overwrite: - if folder.exists(): + if folder.exists(): import shutil + shutil.rmtree(folder) else: assert not folder.exists(), f"Folder {folder} already exists"