mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-01 05:30:23 +08:00
Bump pdb and bdb to 3.14 (#14042)
This commit is contained in:
+59
-15
@@ -1,17 +1,21 @@
|
||||
import signal
|
||||
import sys
|
||||
from bdb import Bdb
|
||||
from bdb import Bdb, _Backend
|
||||
from cmd import Cmd
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from inspect import _SourceObjectType
|
||||
from linecache import _ModuleGlobals
|
||||
from types import CodeType, FrameType, TracebackType
|
||||
from typing import IO, Any, ClassVar, Final, TypeVar
|
||||
from typing_extensions import ParamSpec, Self
|
||||
from typing import IO, Any, ClassVar, Final, Literal, TypeVar
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
|
||||
__all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace", "post_mortem", "help"]
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ += ["set_default_backend", "get_default_backend"]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_P = ParamSpec("_P")
|
||||
_Mode: TypeAlias = Literal["inline", "cli"]
|
||||
|
||||
line_prefix: str # undocumented
|
||||
|
||||
@@ -21,7 +25,16 @@ def run(statement: str, globals: dict[str, Any] | None = None, locals: Mapping[s
|
||||
def runeval(expression: str, globals: dict[str, Any] | None = None, locals: Mapping[str, Any] | None = None) -> Any: ...
|
||||
def runctx(statement: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> None: ...
|
||||
def runcall(func: Callable[_P, _T], *args: _P.args, **kwds: _P.kwargs) -> _T | None: ...
|
||||
def set_trace(*, header: str | None = None) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def set_default_backend(backend: _Backend) -> None: ...
|
||||
def get_default_backend() -> _Backend: ...
|
||||
def set_trace(*, header: str | None = None, commands: Iterable[str] | None = None) -> None: ...
|
||||
async def set_trace_async(*, header: str | None = None, commands: Iterable[str] | None = None) -> None: ...
|
||||
|
||||
else:
|
||||
def set_trace(*, header: str | None = None) -> None: ...
|
||||
|
||||
def post_mortem(t: TracebackType | None = None) -> None: ...
|
||||
def pm() -> None: ...
|
||||
|
||||
@@ -47,15 +60,35 @@ class Pdb(Bdb, Cmd):
|
||||
curindex: int
|
||||
curframe: FrameType | None
|
||||
curframe_locals: Mapping[str, Any]
|
||||
def __init__(
|
||||
self,
|
||||
completekey: str = "tab",
|
||||
stdin: IO[str] | None = None,
|
||||
stdout: IO[str] | None = None,
|
||||
skip: Iterable[str] | None = None,
|
||||
nosigint: bool = False,
|
||||
readrc: bool = True,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
mode: _Mode | None
|
||||
colorize: bool
|
||||
def __init__(
|
||||
self,
|
||||
completekey: str = "tab",
|
||||
stdin: IO[str] | None = None,
|
||||
stdout: IO[str] | None = None,
|
||||
skip: Iterable[str] | None = None,
|
||||
nosigint: bool = False,
|
||||
readrc: bool = True,
|
||||
mode: _Mode | None = None,
|
||||
backend: _Backend | None = None,
|
||||
colorize: bool = False,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
completekey: str = "tab",
|
||||
stdin: IO[str] | None = None,
|
||||
stdout: IO[str] | None = None,
|
||||
skip: Iterable[str] | None = None,
|
||||
nosigint: bool = False,
|
||||
readrc: bool = True,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def set_trace(self, frame: FrameType | None = None, *, commands: Iterable[str] | None = None) -> None: ...
|
||||
async def set_trace_async(self, frame: FrameType | None = None, *, commands: Iterable[str] | None = None) -> None: ...
|
||||
|
||||
def forget(self) -> None: ...
|
||||
def setup(self, f: FrameType | None, tb: TracebackType | None) -> None: ...
|
||||
if sys.version_info < (3, 11):
|
||||
@@ -75,14 +108,25 @@ class Pdb(Bdb, Cmd):
|
||||
def handle_command_def(self, line: str) -> bool: ...
|
||||
def defaultFile(self) -> str: ...
|
||||
def lineinfo(self, identifier: str) -> tuple[None, None, None] | tuple[str, str, int]: ...
|
||||
def checkline(self, filename: str, lineno: int) -> int: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def checkline(self, filename: str, lineno: int, module_globals: _ModuleGlobals | None = None) -> int: ...
|
||||
else:
|
||||
def checkline(self, filename: str, lineno: int) -> int: ...
|
||||
|
||||
def _getval(self, arg: str) -> object: ...
|
||||
def print_stack_trace(self) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def print_stack_trace(self, count: int | None = None) -> None: ...
|
||||
else:
|
||||
def print_stack_trace(self) -> None: ...
|
||||
|
||||
def print_stack_entry(self, frame_lineno: tuple[FrameType, int], prompt_prefix: str = "\n-> ") -> None: ...
|
||||
def lookupmodule(self, filename: str) -> str | None: ...
|
||||
if sys.version_info < (3, 11):
|
||||
def _runscript(self, filename: str) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def complete_multiline_names(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
def completedefault(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user