summaryrefslogtreecommitdiffstats
path: root/pre_commit/commands/run.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-11 08:29:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-11 08:29:48 +0000
commitb73378b6cdae53383ce4549f0f301ece440b2969 (patch)
tree94678c0984baae45fd0358db8309e9190b3fe362 /pre_commit/commands/run.py
parentReleasing debian version 3.5.0-1. (diff)
downloadpre-commit-b73378b6cdae53383ce4549f0f301ece440b2969.tar.xz
pre-commit-b73378b6cdae53383ce4549f0f301ece440b2969.zip
Merging upstream version 3.6.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/commands/run.py')
-rw-r--r--pre_commit/commands/run.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py
index 41ba4ec..076f16d 100644
--- a/pre_commit/commands/run.py
+++ b/pre_commit/commands/run.py
@@ -9,11 +9,11 @@ import re
import subprocess
import time
import unicodedata
+from collections.abc import Generator
+from collections.abc import Iterable
+from collections.abc import MutableMapping
+from collections.abc import Sequence
from typing import Any
-from typing import Generator
-from typing import Iterable
-from typing import MutableMapping
-from typing import Sequence
from identify.identify import tags_from_path
@@ -74,7 +74,7 @@ class Classifier:
def __init__(self, filenames: Iterable[str]) -> None:
self.filenames = [f for f in filenames if os.path.lexists(f)]
- @functools.lru_cache(maxsize=None)
+ @functools.cache
def _types_for_file(self, filename: str) -> set[str]:
return tags_from_path(filename)