diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-11 08:29:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-11 08:29:48 +0000 |
commit | b73378b6cdae53383ce4549f0f301ece440b2969 (patch) | |
tree | 94678c0984baae45fd0358db8309e9190b3fe362 /pre_commit/commands/run.py | |
parent | Releasing debian version 3.5.0-1. (diff) | |
download | pre-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 '')
-rw-r--r-- | pre_commit/commands/run.py | 10 |
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) |