mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
drop python 3.6 support
python 3.6 reached end of life on 2021-12-23
This commit is contained in:
parent
d3bdf1403d
commit
04de6a2e57
111 changed files with 401 additions and 286 deletions
|
|
@ -1,8 +1,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import sys
|
||||
from typing import Any
|
||||
from typing import IO
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def write(s: str, stream: IO[bytes] = sys.stdout.buffer) -> None:
|
||||
|
|
@ -11,9 +12,9 @@ def write(s: str, stream: IO[bytes] = sys.stdout.buffer) -> None:
|
|||
|
||||
|
||||
def write_line_b(
|
||||
s: Optional[bytes] = None,
|
||||
s: bytes | None = None,
|
||||
stream: IO[bytes] = sys.stdout.buffer,
|
||||
logfile_name: Optional[str] = None,
|
||||
logfile_name: str | None = None,
|
||||
) -> None:
|
||||
with contextlib.ExitStack() as exit_stack:
|
||||
output_streams = [stream]
|
||||
|
|
@ -28,5 +29,5 @@ def write_line_b(
|
|||
output_stream.flush()
|
||||
|
||||
|
||||
def write_line(s: Optional[str] = None, **kwargs: Any) -> None:
|
||||
def write_line(s: str | None = None, **kwargs: Any) -> None:
|
||||
write_line_b(s.encode() if s is not None else s, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue