mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-31 21:20:23 +08:00
Add @type_check_only to various typeshed-only procotols in stdlib (#14465)
Mark various typeshed-only protocols as `@type_check_only` in stdlib
This commit is contained in:
+3
-1
@@ -452,9 +452,11 @@ class complex:
|
||||
@classmethod
|
||||
def from_number(cls, number: complex | SupportsComplex | SupportsFloat | SupportsIndex, /) -> Self: ...
|
||||
|
||||
@type_check_only
|
||||
class _FormatMapMapping(Protocol):
|
||||
def __getitem__(self, key: str, /) -> Any: ...
|
||||
|
||||
@type_check_only
|
||||
class _TranslateTable(Protocol):
|
||||
def __getitem__(self, key: int, /) -> str | int | None: ...
|
||||
|
||||
@@ -1355,7 +1357,7 @@ def chr(i: int | SupportsIndex, /) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def aiter(async_iterable: SupportsAiter[_SupportsAnextT_co], /) -> _SupportsAnextT_co: ...
|
||||
|
||||
@type_check_only
|
||||
class _SupportsSynchronousAnext(Protocol[_AwaitableT_co]):
|
||||
def __anext__(self) -> _AwaitableT_co: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user