Update codebase to Python 3.10 using pyupgrade

This commit is contained in:
Kovid Goyal
2025-01-10 22:31:41 +05:30
parent 922d08516b
commit da1626090a
126 changed files with 1739 additions and 1764 deletions

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
from typing import List, Optional
from kitty.typing import BossType
@@ -29,12 +28,12 @@ The initial tab to display. Defaults to using the tab from the previous kitten i
@result_handler(has_ready_notification=True)
def handle_result(args: List[str], current_char: str, target_window_id: int, boss: BossType) -> None:
def handle_result(args: list[str], current_char: str, target_window_id: int, boss: BossType) -> None:
w = boss.window_id_map.get(target_window_id)
if w is not None:
w.paste_text(current_char)
def main(args: List[str]) -> Optional[str]:
def main(args: list[str]) -> str | None:
raise SystemExit('This should be run as kitten unicode_input')
if __name__ == '__main__':