mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-09 06:45:51 +08:00
Make mapping attribute read-only on dict views classes (#6991)
This commit is contained in:
1 parent
f5db1ccbbd
commit
d053d8ffea
1 file changed
+6
-3
@@ -65,14 +65,17 @@ _VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers.
|
||||
@final
|
||||
class dict_keys(KeysView[_KT_co], Generic[_KT_co, _VT_co]): # undocumented
|
||||
if sys.version_info >= (3, 10):
|
||||
mapping: MappingProxyType[_KT_co, _VT_co]
|
||||
@property
|
||||
def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ...
|
||||
|
||||
@final
|
||||
class dict_values(ValuesView[_VT_co], Generic[_KT_co, _VT_co]): # undocumented
|
||||
if sys.version_info >= (3, 10):
|
||||
mapping: MappingProxyType[_KT_co, _VT_co]
|
||||
@property
|
||||
def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ...
|
||||
|
||||
@final
|
||||
class dict_items(ItemsView[_KT_co, _VT_co], Generic[_KT_co, _VT_co]): # undocumented
|
||||
if sys.version_info >= (3, 10):
|
||||
mapping: MappingProxyType[_KT_co, _VT_co]
|
||||
@property
|
||||
def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ...
|
||||
Reference in new issue
Block a user