@@ -66,7 +66,7 @@ class Entity:
6666 >>> other_entity = registry["other"]
6767 """ # Changes here should be reflected in conftest.py
6868
69- __slots__ = ("registry " , "uid " , "__weakref__ " )
69+ __slots__ = ("__weakref__ " , "registry " , "uid " )
7070
7171 registry : Final [Registry ] # type:ignore[misc] # https://github.com/python/mypy/issues/5774
7272 """The :any:`Registry` this entity belongs to."""
@@ -394,7 +394,7 @@ def _traverse_entities(start: Entity, traverse_parents: tuple[object, ...]) -> I
394394
395395
396396@attrs .define (eq = False , frozen = True , weakref_slot = False )
397- class EntityComponents (MutableMapping [Union [Type [Any ], Tuple [object , Type [Any ]]], Any ]):
397+ class EntityComponents (MutableMapping [Union [Type [Any ], Tuple [object , Type [Any ]]], object ]):
398398 """A proxy attribute to access an entities components like a dictionary.
399399
400400 See :any:`Entity.components`.
@@ -552,7 +552,7 @@ def get(self, __key: ComponentKey[T], /, default: _T1 | None = None) -> T | _T1:
552552 except KeyError :
553553 return default # type: ignore[return-value] # https://github.com/python/mypy/issues/3737
554554
555- def setdefault (self , __key : ComponentKey [T ], __default : T ) -> T : # type: ignore[override]
555+ def setdefault (self , __key : ComponentKey [T ], __default : T , / ) -> T :
556556 """Assign a default value if a component is missing, then returns the current value."""
557557 try :
558558 return self [__key ]
@@ -1040,7 +1040,7 @@ def __getitem__(self, key: ComponentKey[T]) -> EntityComponentRelationMapping[T]
10401040 """Access relations for this component key as a `{target: component}` dict-like object."""
10411041 return EntityComponentRelationMapping (self .entity , key , self .traverse )
10421042
1043- def __setitem__ (self , __key : ComponentKey [T ], __values : Mapping [Entity , object ]) -> None :
1043+ def __setitem__ (self , __key : ComponentKey [T ], __values : Mapping [Entity , object ], / ) -> None :
10441044 """Redefine the component relations for this entity.
10451045
10461046 ..versionadded:: 4.2.0
0 commit comments