|
1 | 1 | import sys |
2 | | -from _typeshed import ExcInfo, TraceFunction, Unused |
| 2 | +from _typeshed import ExcInfo, ReadableBuffer, TraceFunction, Unused |
3 | 3 | from collections.abc import Callable, Iterable, Iterator, Mapping |
4 | 4 | from contextlib import contextmanager |
5 | 5 | from types import CodeType, FrameType, TracebackType |
@@ -85,11 +85,21 @@ class Bdb: |
85 | 85 | def get_all_breaks(self) -> dict[str, list[int]]: ... |
86 | 86 | def get_stack(self, f: FrameType | None, t: TracebackType | None) -> tuple[list[tuple[FrameType, int]], int]: ... |
87 | 87 | def format_stack_entry(self, frame_lineno: tuple[FrameType, int], lprefix: str = ": ") -> str: ... |
88 | | - def run( |
89 | | - self, cmd: str | CodeType, globals: dict[str, Any] | None = None, locals: Mapping[str, Any] | None = None |
| 88 | + def run( # matches `builtins.exec` |
| 89 | + self, |
| 90 | + cmd: str | ReadableBuffer | CodeType, |
| 91 | + globals: dict[str, Any] | None = None, |
| 92 | + locals: Mapping[str, object] | None = None, |
90 | 93 | ) -> None: ... |
91 | | - def runeval(self, expr: str, globals: dict[str, Any] | None = None, locals: Mapping[str, Any] | None = None) -> None: ... |
92 | | - def runctx(self, cmd: str | CodeType, globals: dict[str, Any] | None, locals: Mapping[str, Any] | None) -> None: ... |
| 94 | + def runctx( # matches `builtins.exec` |
| 95 | + self, cmd: str | ReadableBuffer | CodeType, globals: dict[str, Any] | None, locals: Mapping[str, object] | None |
| 96 | + ) -> None: ... |
| 97 | + def runeval( # matches `builtins.eval` |
| 98 | + self, |
| 99 | + expr: str | ReadableBuffer | CodeType, |
| 100 | + globals: dict[str, Any] | None = None, |
| 101 | + locals: Mapping[str, object] | None = None, |
| 102 | + ) -> Any: ... |
93 | 103 | def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kwds: _P.kwargs) -> _T | None: ... |
94 | 104 | if sys.version_info >= (3, 14): |
95 | 105 | def start_trace(self) -> None: ... |
|
0 commit comments