mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 02:02:14 +02:00
Update codebase to Python 3.10 using pyupgrade
This commit is contained in:
@@ -15,7 +15,6 @@ import time
|
||||
from contextlib import contextmanager, suppress
|
||||
from functools import wraps
|
||||
from pty import CHILD, STDIN_FILENO, STDOUT_FILENO, fork
|
||||
from typing import Optional
|
||||
from unittest import TestCase
|
||||
|
||||
from kitty.config import finalize_keys, finalize_mouse_mappings
|
||||
@@ -91,7 +90,7 @@ class Callbacks:
|
||||
def color_profile_popped(self, x) -> None:
|
||||
pass
|
||||
|
||||
def cmd_output_marking(self, is_start: Optional[bool], data: str = '') -> None:
|
||||
def cmd_output_marking(self, is_start: bool | None, data: str = '') -> None:
|
||||
if is_start:
|
||||
self.last_cmd_at = monotonic()
|
||||
self.last_cmd_cmdline = decode_cmdline(data) if data else data
|
||||
|
||||
@@ -5,10 +5,10 @@ import array
|
||||
import os
|
||||
import tempfile
|
||||
import unittest
|
||||
from collections.abc import Iterable
|
||||
from functools import lru_cache, partial
|
||||
from itertools import repeat
|
||||
from math import ceil
|
||||
from typing import Iterable
|
||||
|
||||
from kitty.constants import is_macos, read_kitty_resource
|
||||
from kitty.fast_data_types import (
|
||||
|
||||
@@ -9,14 +9,13 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
import unittest
|
||||
from collections.abc import Generator, Iterator, Sequence
|
||||
from collections.abc import Callable, Generator, Iterator, Sequence
|
||||
from contextlib import contextmanager
|
||||
from functools import lru_cache
|
||||
from tempfile import TemporaryDirectory
|
||||
from threading import Thread
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
NoReturn,
|
||||
Optional,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user