Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -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]: ...