From b73378b6cdae53383ce4549f0f301ece440b2969 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 11 Dec 2023 09:29:48 +0100 Subject: Merging upstream version 3.6.0. Signed-off-by: Daniel Baumann --- pre_commit/commands/run.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pre_commit/commands/run.py') 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) -- cgit v1.2.3