Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,7 +1,7 @@
import sys
from logging import Logger
from types import TracebackType
from typing import Optional, Type, Union
from typing import Type
def logger() -> Logger: ...
@@ -13,24 +13,24 @@ class _Acquire_ReturnProxy:
def __init__(self, lock: str) -> None: ...
def __enter__(self) -> str: ...
def __exit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], traceback: Optional[TracebackType]
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, traceback: TracebackType | None
) -> None: ...
class BaseFileLock:
def __init__(self, lock_file: str, timeout: Union[float, int, str] = ...) -> None: ...
def __init__(self, lock_file: str, timeout: float | int | str = ...) -> None: ...
@property
def lock_file(self) -> str: ...
@property
def timeout(self) -> float: ...
@timeout.setter
def timeout(self, value: Union[int, str, float]) -> None: ... # type: ignore
def timeout(self, value: int | str | float) -> None: ... # type: ignore
@property
def is_locked(self) -> bool: ...
def acquire(self, timeout: Optional[float] = ..., poll_intervall: float = ...) -> _Acquire_ReturnProxy: ...
def acquire(self, timeout: float | None = ..., poll_intervall: float = ...) -> _Acquire_ReturnProxy: ...
def release(self, force: bool = ...) -> None: ...
def __enter__(self) -> BaseFileLock: ...
def __exit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], traceback: Optional[TracebackType]
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, traceback: TracebackType | None
) -> None: ...
def __del__(self) -> None: ...