mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
fix return type for traceback.format_exception (#326)
format_exception and format_exception_only both return lists of strings, not strings.
This commit is contained in:
committed by
Guido van Rossum
parent
ab08dbbf09
commit
998d787302
@@ -12,8 +12,8 @@ def print_stack(f: FrameType = ..., limit: int = ..., file: IO[AnyStr] = ...) ->
|
||||
def extract_tb(f: TracebackType, limit: int = ...) -> ExtractTbResult: ...
|
||||
def extract_stack(f: FrameType = ..., limit: int = ...) -> ExtractTbResult: ...
|
||||
def format_list(list: ExtractTbResult) -> List[str]: ...
|
||||
def format_exception_only(type: type, value: List[str]) -> str: ...
|
||||
def format_exception(type: type, value: BaseException, tb: TracebackType, limit: int = ...) -> str: ...
|
||||
def format_exception_only(type: type, value: List[str]) -> List[str]: ...
|
||||
def format_exception(type: type, value: BaseException, tb: TracebackType, limit: int = ...) -> List[str]: ...
|
||||
def format_tb(f: TracebackType, limit: int = ...) -> List[str]: ...
|
||||
def format_stack(f: FrameType = ..., limit: int = ...) -> List[str]: ...
|
||||
def tb_lineno(tb: TracebackType) -> AnyStr: ...
|
||||
|
||||
@@ -5,8 +5,8 @@ from types import TracebackType
|
||||
import typing
|
||||
|
||||
# TODO signatures
|
||||
def format_exception_only(etype, value): ...
|
||||
def format_exception(type: type, value: BaseException, tb: TracebackType, limit: int, chain: bool) -> str: ...
|
||||
def format_exception_only(etype, value) -> List[str]: ...
|
||||
def format_exception(type: type, value: BaseException, tb: TracebackType, limit: int, chain: bool) -> List[str]: ...
|
||||
def format_tb(traceback): ...
|
||||
def print_exc(limit=..., file=..., chain=...): ...
|
||||
def format_exc(limit: int = ..., chain: bool = ...) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user