mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-17 21:54:03 +00:00
make ty 85 happy
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
This commit is contained in:
parent
9f61eaf0f2
commit
7e7355ccbe
3 changed files with 7 additions and 7 deletions
|
|
@ -12,7 +12,7 @@ import struct
|
|||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
from collections.abc import Iterator, Sequence
|
||||
from collections.abc import Generator, Iterator, Sequence
|
||||
from contextlib import contextmanager, suppress
|
||||
from functools import lru_cache
|
||||
from itertools import chain
|
||||
|
|
@ -742,7 +742,7 @@ const NoPreferenceThemeFileName = "{ThemeFile.no_preference.value}"
|
|||
|
||||
|
||||
@contextmanager
|
||||
def replace_if_needed(path: str, show_diff: bool = False) -> Iterator[io.StringIO]:
|
||||
def replace_if_needed(path: str, show_diff: bool = False) -> Generator[io.StringIO, None, None]:
|
||||
buf = io.StringIO()
|
||||
origb = sys.stdout
|
||||
sys.stdout = buf
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class CurrentlyParsing:
|
|||
return CurrentlyParsing(self.line, self.number, self.file)
|
||||
|
||||
@contextmanager
|
||||
def set_line(self, line: str, number: int) -> Iterator['CurrentlyParsing']:
|
||||
def set_line(self, line: str, number: int) -> Generator['CurrentlyParsing', None, None]:
|
||||
orig = self.line, self.number
|
||||
self.line = line
|
||||
self.number = number
|
||||
|
|
@ -169,7 +169,7 @@ class CurrentlyParsing:
|
|||
self.line, self.number = orig
|
||||
|
||||
@contextmanager
|
||||
def set_file(self, file: str) -> Iterator['CurrentlyParsing']:
|
||||
def set_file(self, file: str) -> Generator['CurrentlyParsing', None, None]:
|
||||
orig = self.file
|
||||
self.file = file
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ def log_error(*a: Any, **k: str) -> None:
|
|||
|
||||
|
||||
@contextmanager
|
||||
def suppress_error_logging() -> Iterator[None]:
|
||||
def suppress_error_logging() -> Generator[None, None, None]:
|
||||
before = getattr(log_error, 'redirect', suppress_error_logging)
|
||||
setattr(log_error, 'redirect', lambda *a: None)
|
||||
try:
|
||||
|
|
@ -504,7 +504,7 @@ def set_echo(fd: int = -1, on: bool = False) -> tuple[int, list[int | list[bytes
|
|||
|
||||
|
||||
@contextmanager
|
||||
def no_echo(fd: int = -1) -> Iterator[None]:
|
||||
def no_echo(fd: int = -1) -> Generator[None, None, None]:
|
||||
import termios
|
||||
|
||||
fd, old = set_echo(fd)
|
||||
|
|
@ -1238,7 +1238,7 @@ def unlock_file(f: IO[bytes] | IO[str]) -> None:
|
|||
|
||||
|
||||
@contextmanager
|
||||
def lock_with_file(path: str) -> Iterator[None]:
|
||||
def lock_with_file(path: str) -> Generator[None, None, None]:
|
||||
"""Take an exclusive advisory lock on path, waiting for it to become available.
|
||||
|
||||
The lock file is created if needed and left in place, since unlinking it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue