mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-12 19:30:53 +08:00
Specialize plain slice type hints (#13007)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
from _typeshed import SupportsWrite, Unused
|
||||
from collections.abc import Generator, Iterable, Iterator, Mapping
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, ClassVar, Literal, overload
|
||||
from typing import Any, ClassVar, Literal, SupportsIndex, overload
|
||||
from typing_extensions import Self, TypeAlias, deprecated
|
||||
|
||||
__all__ = [
|
||||
@@ -305,9 +305,9 @@ class FrameSummary:
|
||||
@overload
|
||||
def __getitem__(self, pos: Literal[3]) -> str | None: ...
|
||||
@overload
|
||||
def __getitem__(self, pos: int) -> Any: ...
|
||||
def __getitem__(self, pos: SupportsIndex) -> Any: ...
|
||||
@overload
|
||||
def __getitem__(self, pos: slice) -> tuple[Any, ...]: ...
|
||||
def __getitem__(self, pos: slice[SupportsIndex | None]) -> tuple[Any, ...]: ...
|
||||
def __iter__(self) -> Iterator[Any]: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __len__(self) -> Literal[4]: ...
|
||||
|
||||
Reference in New Issue
Block a user