summaryrefslogtreecommitdiffstats
path: root/pre_commit/util.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-29 09:34:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-29 09:34:25 +0000
commit2ee9e61602b53a25db056d99ea0308b245120c03 (patch)
tree5fc6890331d99ec0f2ba060b90cc68ea62f714f1 /pre_commit/util.py
parentAdding upstream version 3.7.1. (diff)
downloadpre-commit-2ee9e61602b53a25db056d99ea0308b245120c03.tar.xz
pre-commit-2ee9e61602b53a25db056d99ea0308b245120c03.zip
Adding upstream version 3.8.0.upstream/3.8.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/util.py')
-rw-r--r--pre_commit/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pre_commit/util.py b/pre_commit/util.py
index b75c84a..12aa3c0 100644
--- a/pre_commit/util.py
+++ b/pre_commit/util.py
@@ -205,7 +205,7 @@ else: # pragma: no cover
def _handle_readonly(
func: Callable[[str], object],
path: str,
- exc: Exception,
+ exc: BaseException,
) -> None:
if (
func in (os.rmdir, os.remove, os.unlink) and
@@ -223,7 +223,7 @@ if sys.version_info < (3, 12): # pragma: <3.12 cover
def _handle_readonly_old(
func: Callable[[str], object],
path: str,
- excinfo: tuple[type[Exception], Exception, TracebackType],
+ excinfo: tuple[type[BaseException], BaseException, TracebackType],
) -> None:
return _handle_readonly(func, path, excinfo[1])