Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -7,26 +7,19 @@ def reset() -> str: ... # undocumented
def small(text: str) -> str: ... # undocumented
def strong(text: str) -> str: ... # undocumented
def grey(text: str) -> str: ... # undocumented
def lookup(name: str, frame: FrameType, locals: Dict[str, Any]) -> Tuple[Optional[str], Any]: ... # undocumented
def lookup(name: str, frame: FrameType, locals: Dict[str, Any]) -> Tuple[str | None, Any]: ... # undocumented
def scanvars(
reader: Callable[[], bytes], frame: FrameType, locals: Dict[str, Any]
) -> List[Tuple[str, Optional[str], Any]]: ... # undocumented
) -> List[Tuple[str, str | None, Any]]: ... # undocumented
def html(einfo: _ExcInfo, context: int = ...) -> str: ...
def text(einfo: _ExcInfo, context: int = ...) -> str: ...
class Hook: # undocumented
def __init__(
self,
display: int = ...,
logdir: Optional[Text] = ...,
context: int = ...,
file: Optional[IO[str]] = ...,
format: str = ...,
self, display: int = ..., logdir: Text | None = ..., context: int = ..., file: IO[str] | None = ..., format: str = ...
) -> None: ...
def __call__(
self, etype: Optional[Type[BaseException]], evalue: Optional[BaseException], etb: Optional[TracebackType]
) -> None: ...
def handle(self, info: Optional[_ExcInfo] = ...) -> None: ...
def __call__(self, etype: Type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ...
def handle(self, info: _ExcInfo | None = ...) -> None: ...
def handler(info: Optional[_ExcInfo] = ...) -> None: ...
def enable(display: int = ..., logdir: Optional[Text] = ..., context: int = ..., format: str = ...) -> None: ...
def handler(info: _ExcInfo | None = ...) -> None: ...
def enable(display: int = ..., logdir: Text | None = ..., context: int = ..., format: str = ...) -> None: ...