mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from types import FrameType, TracebackType
|
||||
from typing import IO, List, Optional, Tuple, Type
|
||||
from typing import IO, Optional
|
||||
|
||||
_PT = Tuple[str, int, str, Optional[str]]
|
||||
_PT = tuple[str, int, str, Optional[str]]
|
||||
|
||||
def print_tb(tb: TracebackType | None, limit: int | None = ..., file: IO[str] | None = ...) -> None: ...
|
||||
def print_exception(
|
||||
etype: Type[BaseException] | None,
|
||||
etype: type[BaseException] | None,
|
||||
value: BaseException | None,
|
||||
tb: TracebackType | None,
|
||||
limit: int | None = ...,
|
||||
@@ -14,14 +14,14 @@ def print_exception(
|
||||
def print_exc(limit: int | None = ..., file: IO[str] | None = ...) -> None: ...
|
||||
def print_last(limit: int | None = ..., file: IO[str] | None = ...) -> None: ...
|
||||
def print_stack(f: FrameType | None = ..., limit: int | None = ..., file: IO[str] | None = ...) -> None: ...
|
||||
def extract_tb(tb: TracebackType | None, limit: int | None = ...) -> List[_PT]: ...
|
||||
def extract_stack(f: FrameType | None = ..., limit: int | None = ...) -> List[_PT]: ...
|
||||
def format_list(extracted_list: List[_PT]) -> List[str]: ...
|
||||
def format_exception_only(etype: Type[BaseException] | None, value: BaseException | None) -> List[str]: ...
|
||||
def extract_tb(tb: TracebackType | None, limit: int | None = ...) -> list[_PT]: ...
|
||||
def extract_stack(f: FrameType | None = ..., limit: int | None = ...) -> list[_PT]: ...
|
||||
def format_list(extracted_list: list[_PT]) -> list[str]: ...
|
||||
def format_exception_only(etype: type[BaseException] | None, value: BaseException | None) -> list[str]: ...
|
||||
def format_exception(
|
||||
etype: Type[BaseException] | None, value: BaseException | None, tb: TracebackType | None, limit: int | None = ...
|
||||
) -> List[str]: ...
|
||||
etype: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None, limit: int | None = ...
|
||||
) -> list[str]: ...
|
||||
def format_exc(limit: int | None = ...) -> str: ...
|
||||
def format_tb(tb: TracebackType | None, limit: int | None = ...) -> List[str]: ...
|
||||
def format_stack(f: FrameType | None = ..., limit: int | None = ...) -> List[str]: ...
|
||||
def format_tb(tb: TracebackType | None, limit: int | None = ...) -> list[str]: ...
|
||||
def format_stack(f: FrameType | None = ..., limit: int | None = ...) -> list[str]: ...
|
||||
def tb_lineno(tb: TracebackType) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user