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:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-11 08:29:45 +0000
commitbfb804ed317bbbd1e0089c80c1b1d3510185bca6 (patch)
tree93ee86b21565e569256a09e651a10c08befcd4b8 /pre_commit/commands/run.py
parentAdding upstream version 3.5.0. (diff)
downloadpre-commit-bfb804ed317bbbd1e0089c80c1b1d3510185bca6.tar.xz
pre-commit-bfb804ed317bbbd1e0089c80c1b1d3510185bca6.zip
Adding upstream version 3.6.0.upstream/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)