Merging upstream version 3.6.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
391b92c4f9
commit
04fadfcf8e
55 changed files with 266 additions and 248 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue