1
0
Fork 0

Merging upstream version 3.1.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:38:08 +01:00
parent f7ee0eb8fc
commit c4c52947de
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
88 changed files with 1083 additions and 974 deletions

View file

@ -12,7 +12,6 @@ from types import TracebackType
from typing import Any
from typing import Callable
from typing import Generator
from typing import IO
from pre_commit import parse_shebang
@ -36,10 +35,6 @@ def clean_path_on_failure(path: str) -> Generator[None, None, None]:
raise
def resource_bytesio(filename: str) -> IO[bytes]:
return importlib.resources.open_binary('pre_commit.resources', filename)
def resource_text(filename: str) -> str:
return importlib.resources.read_text('pre_commit.resources', filename)
@ -67,7 +62,7 @@ class CalledProcessError(RuntimeError):
def __bytes__(self) -> bytes:
def _indent_or_none(part: bytes | None) -> bytes:
if part:
return b'\n ' + part.replace(b'\n', b'\n ')
return b'\n ' + part.replace(b'\n', b'\n ').rstrip()
else:
return b' (none)'