mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import SupportsWrite
|
||||
from types import FrameType, TracebackType
|
||||
from typing import IO, Any, Dict, Generator, Iterable, Iterator, List, Mapping, Optional, Set, Tuple, Type
|
||||
from typing import IO, Any, Generator, Iterable, Iterator, List, Mapping, Optional, Set, Tuple, Type
|
||||
|
||||
_PT = Tuple[str, int, str, Optional[str]]
|
||||
|
||||
@@ -32,16 +32,16 @@ def print_last(limit: int | None = ..., file: IO[str] | None = ..., chain: bool
|
||||
def print_stack(f: FrameType | None = ..., limit: int | None = ..., file: IO[str] | None = ...) -> None: ...
|
||||
def extract_tb(tb: TracebackType | None, limit: int | None = ...) -> StackSummary: ...
|
||||
def extract_stack(f: FrameType | None = ..., limit: int | None = ...) -> StackSummary: ...
|
||||
def format_list(extracted_list: List[FrameSummary]) -> List[str]: ...
|
||||
def format_list(extracted_list: list[FrameSummary]) -> list[str]: ...
|
||||
|
||||
# undocumented
|
||||
def print_list(extracted_list: List[FrameSummary], file: SupportsWrite[str] | None = ...) -> None: ...
|
||||
def print_list(extracted_list: list[FrameSummary], file: SupportsWrite[str] | None = ...) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def format_exception_only(__exc: Type[BaseException] | None, value: BaseException | None = ...) -> List[str]: ...
|
||||
def format_exception_only(__exc: Type[BaseException] | None, value: BaseException | None = ...) -> list[str]: ...
|
||||
|
||||
else:
|
||||
def format_exception_only(etype: Type[BaseException] | None, value: BaseException | None) -> List[str]: ...
|
||||
def format_exception_only(etype: Type[BaseException] | None, value: BaseException | None) -> list[str]: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def format_exception(
|
||||
@@ -50,7 +50,7 @@ if sys.version_info >= (3, 10):
|
||||
tb: TracebackType | None = ...,
|
||||
limit: int | None = ...,
|
||||
chain: bool = ...,
|
||||
) -> List[str]: ...
|
||||
) -> list[str]: ...
|
||||
|
||||
else:
|
||||
def format_exception(
|
||||
@@ -59,11 +59,11 @@ else:
|
||||
tb: TracebackType | None,
|
||||
limit: int | None = ...,
|
||||
chain: bool = ...,
|
||||
) -> List[str]: ...
|
||||
) -> list[str]: ...
|
||||
|
||||
def format_exc(limit: int | None = ..., chain: bool = ...) -> 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 clear_frames(tb: TracebackType) -> None: ...
|
||||
def walk_stack(f: FrameType | None) -> Iterator[Tuple[FrameType, int]]: ...
|
||||
def walk_tb(tb: TracebackType | None) -> Iterator[Tuple[FrameType, int]]: ...
|
||||
@@ -126,7 +126,7 @@ class FrameSummary(Iterable[Any]):
|
||||
lineno: int
|
||||
name: str
|
||||
line: str
|
||||
locals: Dict[str, str] | None
|
||||
locals: dict[str, str] | None
|
||||
def __init__(
|
||||
self,
|
||||
filename: str,
|
||||
@@ -153,5 +153,5 @@ class StackSummary(List[FrameSummary]):
|
||||
capture_locals: bool = ...,
|
||||
) -> StackSummary: ...
|
||||
@classmethod
|
||||
def from_list(cls, a_list: List[_PT]) -> StackSummary: ...
|
||||
def format(self) -> List[str]: ...
|
||||
def from_list(cls, a_list: list[_PT]) -> StackSummary: ...
|
||||
def format(self) -> list[str]: ...
|
||||
|
||||
Reference in New Issue
Block a user