mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
Fix: incorrect type for Bdb.format_stack_entry (#13485)
```python
def format_stack_entry(self, frame_lineno, lprefix=': '):
...
frame, lineno = frame_lineno
```
The type of `frame_lineno` is `tuple[FrameType, int]` not `int`,
understandably, since the type of `frame_lineno` can be interprted as
the line number of the frame. But looking at the implementation of
`Bdb.format_stack_entry`, it is clear that `frame_lineno` is a tuple.
It is also necessary to somehow pass a frame to `format_stack_entry` if
we want it to be formatted...
This commit is contained in:
@@ -78,7 +78,7 @@ class Bdb:
|
||||
def get_file_breaks(self, filename: str) -> list[Breakpoint]: ...
|
||||
def get_all_breaks(self) -> list[Breakpoint]: ...
|
||||
def get_stack(self, f: FrameType | None, t: TracebackType | None) -> tuple[list[tuple[FrameType, int]], int]: ...
|
||||
def format_stack_entry(self, frame_lineno: int, lprefix: str = ": ") -> str: ...
|
||||
def format_stack_entry(self, frame_lineno: tuple[FrameType, int], lprefix: str = ": ") -> str: ...
|
||||
def run(
|
||||
self, cmd: str | CodeType, globals: dict[str, Any] | None = None, locals: Mapping[str, Any] | None = None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user