mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Overload gdb.execute return type (#11638)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import _typeshed
|
||||
from collections.abc import Callable, Iterator, Sequence
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Protocol, final, overload
|
||||
from typing import Literal, Protocol, final, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
import gdb.types
|
||||
@@ -23,7 +23,14 @@ STDOUT: int
|
||||
STDERR: int
|
||||
STDLOG: int
|
||||
|
||||
def execute(command: str, from_tty: bool = ..., to_string: bool = ...) -> str | None: ...
|
||||
@overload
|
||||
def execute(command: str, from_tty: bool = False, to_string: Literal[False] = False) -> None: ...
|
||||
@overload
|
||||
def execute(command: str, *, to_string: Literal[True]) -> str: ...
|
||||
@overload
|
||||
def execute(command: str, from_tty: bool, to_string: Literal[True]) -> str: ...
|
||||
@overload
|
||||
def execute(command: str, from_tty: bool = False, to_string: bool = False) -> str | None: ...
|
||||
def breakpoints() -> Sequence[Breakpoint]: ...
|
||||
def rbreak(regex: str, minsyms: bool = ..., throttle: int = ..., symtabs: Iterator[Symtab] = ...) -> list[Breakpoint]: ...
|
||||
def parameter(parameter: str, /) -> bool | int | str | None: ...
|
||||
|
||||
Reference in New Issue
Block a user