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

@@ -4,7 +4,7 @@ from bdb import Bdb
from cmd import Cmd
from inspect import _SourceObjectType
from types import CodeType, FrameType, TracebackType
from typing import IO, Any, Callable, ClassVar, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, TypeVar, Union
from typing import IO, Any, Callable, ClassVar, Dict, Iterable, List, Mapping, Sequence, Tuple, TypeVar
_T = TypeVar("_T")
@@ -12,18 +12,18 @@ line_prefix: str # undocumented
class Restart(Exception): ...
def run(statement: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> None: ...
def runeval(expression: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> Any: ...
def run(statement: str, globals: Dict[str, Any] | None = ..., locals: Mapping[str, Any] | None = ...) -> None: ...
def runeval(expression: str, globals: Dict[str, Any] | None = ..., locals: Mapping[str, Any] | None = ...) -> Any: ...
def runctx(statement: str, globals: Dict[str, Any], locals: Mapping[str, Any]) -> None: ...
def runcall(func: Callable[..., _T], *args: Any, **kwds: Any) -> Optional[_T]: ...
def runcall(func: Callable[..., _T], *args: Any, **kwds: Any) -> _T | None: ...
if sys.version_info >= (3, 7):
def set_trace(*, header: Optional[str] = ...) -> None: ...
def set_trace(*, header: str | None = ...) -> None: ...
else:
def set_trace() -> None: ...
def post_mortem(t: Optional[TracebackType] = ...) -> None: ...
def post_mortem(t: TracebackType | None = ...) -> None: ...
def pm() -> None: ...
class Pdb(Bdb, Cmd):
@@ -39,66 +39,66 @@ class Pdb(Bdb, Cmd):
commands_doprompt: Dict[int, bool]
commands_silent: Dict[int, bool]
commands_defining: bool
commands_bnum: Optional[int]
lineno: Optional[int]
commands_bnum: int | None
lineno: int | None
stack: List[Tuple[FrameType, int]]
curindex: int
curframe: Optional[FrameType]
curframe: FrameType | None
curframe_locals: Mapping[str, Any]
def __init__(
self,
completekey: str = ...,
stdin: Optional[IO[str]] = ...,
stdout: Optional[IO[str]] = ...,
skip: Optional[Iterable[str]] = ...,
stdin: IO[str] | None = ...,
stdout: IO[str] | None = ...,
skip: Iterable[str] | None = ...,
nosigint: bool = ...,
readrc: bool = ...,
) -> None: ...
def forget(self) -> None: ...
def setup(self, f: Optional[FrameType], tb: Optional[TracebackType]) -> None: ...
def setup(self, f: FrameType | None, tb: TracebackType | None) -> None: ...
def execRcLines(self) -> None: ...
def bp_commands(self, frame: FrameType) -> bool: ...
def interaction(self, frame: Optional[FrameType], traceback: Optional[TracebackType]) -> None: ...
def interaction(self, frame: FrameType | None, traceback: TracebackType | None) -> None: ...
def displayhook(self, obj: object) -> None: ...
def handle_command_def(self, line: str) -> bool: ...
def defaultFile(self) -> str: ...
def lineinfo(self, identifier: str) -> Union[Tuple[None, None, None], Tuple[str, str, int]]: ...
def lineinfo(self, identifier: str) -> Tuple[None, None, None] | Tuple[str, str, int]: ...
def checkline(self, filename: str, lineno: int) -> int: ...
def _getval(self, arg: str) -> object: ...
def print_stack_trace(self) -> None: ...
def print_stack_entry(self, frame_lineno: Tuple[FrameType, int], prompt_prefix: str = ...) -> None: ...
def lookupmodule(self, filename: str) -> Optional[str]: ...
def lookupmodule(self, filename: str) -> str | None: ...
def _runscript(self, filename: str) -> None: ...
def do_commands(self, arg: str) -> Optional[bool]: ...
def do_break(self, arg: str, temporary: bool = ...) -> Optional[bool]: ...
def do_tbreak(self, arg: str) -> Optional[bool]: ...
def do_enable(self, arg: str) -> Optional[bool]: ...
def do_disable(self, arg: str) -> Optional[bool]: ...
def do_condition(self, arg: str) -> Optional[bool]: ...
def do_ignore(self, arg: str) -> Optional[bool]: ...
def do_clear(self, arg: str) -> Optional[bool]: ...
def do_where(self, arg: str) -> Optional[bool]: ...
def do_up(self, arg: str) -> Optional[bool]: ...
def do_down(self, arg: str) -> Optional[bool]: ...
def do_until(self, arg: str) -> Optional[bool]: ...
def do_step(self, arg: str) -> Optional[bool]: ...
def do_next(self, arg: str) -> Optional[bool]: ...
def do_run(self, arg: str) -> Optional[bool]: ...
def do_return(self, arg: str) -> Optional[bool]: ...
def do_continue(self, arg: str) -> Optional[bool]: ...
def do_jump(self, arg: str) -> Optional[bool]: ...
def do_debug(self, arg: str) -> Optional[bool]: ...
def do_quit(self, arg: str) -> Optional[bool]: ...
def do_EOF(self, arg: str) -> Optional[bool]: ...
def do_args(self, arg: str) -> Optional[bool]: ...
def do_retval(self, arg: str) -> Optional[bool]: ...
def do_p(self, arg: str) -> Optional[bool]: ...
def do_pp(self, arg: str) -> Optional[bool]: ...
def do_list(self, arg: str) -> Optional[bool]: ...
def do_whatis(self, arg: str) -> Optional[bool]: ...
def do_alias(self, arg: str) -> Optional[bool]: ...
def do_unalias(self, arg: str) -> Optional[bool]: ...
def do_help(self, arg: str) -> Optional[bool]: ...
def do_commands(self, arg: str) -> bool | None: ...
def do_break(self, arg: str, temporary: bool = ...) -> bool | None: ...
def do_tbreak(self, arg: str) -> bool | None: ...
def do_enable(self, arg: str) -> bool | None: ...
def do_disable(self, arg: str) -> bool | None: ...
def do_condition(self, arg: str) -> bool | None: ...
def do_ignore(self, arg: str) -> bool | None: ...
def do_clear(self, arg: str) -> bool | None: ...
def do_where(self, arg: str) -> bool | None: ...
def do_up(self, arg: str) -> bool | None: ...
def do_down(self, arg: str) -> bool | None: ...
def do_until(self, arg: str) -> bool | None: ...
def do_step(self, arg: str) -> bool | None: ...
def do_next(self, arg: str) -> bool | None: ...
def do_run(self, arg: str) -> bool | None: ...
def do_return(self, arg: str) -> bool | None: ...
def do_continue(self, arg: str) -> bool | None: ...
def do_jump(self, arg: str) -> bool | None: ...
def do_debug(self, arg: str) -> bool | None: ...
def do_quit(self, arg: str) -> bool | None: ...
def do_EOF(self, arg: str) -> bool | None: ...
def do_args(self, arg: str) -> bool | None: ...
def do_retval(self, arg: str) -> bool | None: ...
def do_p(self, arg: str) -> bool | None: ...
def do_pp(self, arg: str) -> bool | None: ...
def do_list(self, arg: str) -> bool | None: ...
def do_whatis(self, arg: str) -> bool | None: ...
def do_alias(self, arg: str) -> bool | None: ...
def do_unalias(self, arg: str) -> bool | None: ...
def do_help(self, arg: str) -> bool | None: ...
do_b = do_break
do_cl = do_clear
do_w = do_where
@@ -125,16 +125,16 @@ class Pdb(Bdb, Cmd):
def message(self, msg: str) -> None: ...
def error(self, msg: str) -> None: ...
def _select_frame(self, number: int) -> None: ...
def _getval_except(self, arg: str, frame: Optional[FrameType] = ...) -> object: ...
def _getval_except(self, arg: str, frame: FrameType | None = ...) -> object: ...
def _print_lines(
self, lines: Sequence[str], start: int, breaks: Sequence[int] = ..., frame: Optional[FrameType] = ...
self, lines: Sequence[str], start: int, breaks: Sequence[int] = ..., frame: FrameType | None = ...
) -> None: ...
def _cmdloop(self) -> None: ...
def do_display(self, arg: str) -> Optional[bool]: ...
def do_interact(self, arg: str) -> Optional[bool]: ...
def do_longlist(self, arg: str) -> Optional[bool]: ...
def do_source(self, arg: str) -> Optional[bool]: ...
def do_undisplay(self, arg: str) -> Optional[bool]: ...
def do_display(self, arg: str) -> bool | None: ...
def do_interact(self, arg: str) -> bool | None: ...
def do_longlist(self, arg: str) -> bool | None: ...
def do_source(self, arg: str) -> bool | None: ...
def do_undisplay(self, arg: str) -> bool | None: ...
do_ll = do_longlist
def _complete_location(self, text: str, line: str, begidx: int, endidx: int) -> List[str]: ...
def _complete_bpnumber(self, text: str, line: str, begidx: int, endidx: int) -> List[str]: ...
@@ -164,7 +164,7 @@ class Pdb(Bdb, Cmd):
# undocumented
def find_function(funcname: str, filename: str) -> Optional[Tuple[str, str, int]]: ...
def find_function(funcname: str, filename: str) -> Tuple[str, str, int] | None: ...
def main() -> None: ...
def help() -> None: ...
def getsourcelines(obj: _SourceObjectType) -> Tuple[List[str], int]: ...