1
0
Fork 0

Adding upstream version 3.6.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:45:51 +01:00
parent 3e8db4df26
commit 0e9e0db1eb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
55 changed files with 266 additions and 248 deletions

View file

@ -6,9 +6,9 @@ import importlib.resources
import os.path
import shutil
import tarfile
from typing import Generator
from collections.abc import Generator
from collections.abc import Sequence
from typing import IO
from typing import Sequence
import pre_commit.constants as C
from pre_commit import lang_base
@ -25,7 +25,8 @@ run_hook = lang_base.basic_run_hook
def _resource_bytesio(filename: str) -> IO[bytes]:
return importlib.resources.open_binary('pre_commit.resources', filename)
files = importlib.resources.files('pre_commit.resources')
return files.joinpath(filename).open('rb')
@functools.lru_cache(maxsize=1)