Run pyupgrade to update the codebase to python 3.9

Gets rid of a lot of typing ugliness by using type annotations on
builtin types
This commit is contained in:
Kovid Goyal
2024-07-31 07:55:27 +05:30
parent 3aac62f6c7
commit f1d0d0949b
48 changed files with 593 additions and 602 deletions

View File

@@ -6,9 +6,10 @@
import os
from collections.abc import Sequence
from concurrent.futures import ProcessPoolExecutor
from multiprocessing import context, get_all_start_methods, get_context, spawn, util
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Tuple, Union
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
from .constants import kitty_exe
@@ -52,7 +53,7 @@ def get_process_pool_executor(
prefer_fork: bool = False,
max_workers: Optional[int] = None,
initializer: Optional[Callable[..., None]] = None,
initargs: Tuple[Any, ...] = ()
initargs: tuple[Any, ...] = ()
) -> ProcessPoolExecutor:
if prefer_fork and 'fork' in get_all_start_methods():
ctx: Union[context.DefaultContext, context.ForkContext] = get_context('fork')