mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-16 11:34:56 +08:00
Replace Mapping with types.MappingProxyType (#6013)
Mark `Signature.parameters` and `.return_annotation` as read-only properties
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import sys
|
||||
import types
|
||||
from abc import ABCMeta
|
||||
from builtins import property as _builtins_property
|
||||
from typing import Any, Iterator, Mapping, Type, TypeVar
|
||||
from typing import Any, Iterator, Type, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S", bound=Type[Enum])
|
||||
@@ -17,7 +18,7 @@ class EnumMeta(ABCMeta):
|
||||
def __contains__(self: Type[Any], member: object) -> bool: ...
|
||||
def __getitem__(self: Type[_T], name: str) -> _T: ...
|
||||
@_builtins_property
|
||||
def __members__(self: Type[_T]) -> Mapping[str, _T]: ...
|
||||
def __members__(self: Type[_T]) -> types.MappingProxyType[str, _T]: ...
|
||||
def __len__(self) -> int: ...
|
||||
_member_names_: list[str] # undocumented
|
||||
_member_map_: dict[str, Enum] # undocumented
|
||||
|
||||
Reference in New Issue
Block a user