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

@@ -1,22 +1,22 @@
from types import CodeType
from typing import Any, Callable, Mapping, Optional
from typing import Any, Callable, Mapping
class InteractiveInterpreter:
def __init__(self, locals: Optional[Mapping[str, Any]] = ...) -> None: ...
def __init__(self, locals: Mapping[str, Any] | None = ...) -> None: ...
def runsource(self, source: str, filename: str = ..., symbol: str = ...) -> bool: ...
def runcode(self, code: CodeType) -> None: ...
def showsyntaxerror(self, filename: Optional[str] = ...) -> None: ...
def showsyntaxerror(self, filename: str | None = ...) -> None: ...
def showtraceback(self) -> None: ...
def write(self, data: str) -> None: ...
class InteractiveConsole(InteractiveInterpreter):
def __init__(self, locals: Optional[Mapping[str, Any]] = ..., filename: str = ...) -> None: ...
def interact(self, banner: Optional[str] = ...) -> None: ...
def __init__(self, locals: Mapping[str, Any] | None = ..., filename: str = ...) -> None: ...
def interact(self, banner: str | None = ...) -> None: ...
def push(self, line: str) -> bool: ...
def resetbuffer(self) -> None: ...
def raw_input(self, prompt: str = ...) -> str: ...
def interact(
banner: Optional[str] = ..., readfunc: Optional[Callable[[str], str]] = ..., local: Optional[Mapping[str, Any]] = ...
banner: str | None = ..., readfunc: Callable[[str], str] | None = ..., local: Mapping[str, Any] | None = ...
) -> None: ...
def compile_command(source: str, filename: str = ..., symbol: str = ...) -> Optional[CodeType]: ...
def compile_command(source: str, filename: str = ..., symbol: str = ...) -> CodeType | None: ...