Skip to content

Commit d48de23

Browse files
committed
Fix type-hint lint warning wanting a Self return
This function explicitly returns Entity which prevents a Self return, but it still allows Self to be added as a union to the return type.
1 parent ea6d028 commit d48de23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcod/ecs/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def world(self) -> Registry:
8282
"""
8383
return self.registry
8484

85-
def __new__(cls, registry: Registry, uid: object = object) -> Entity: # noqa: PYI034
85+
def __new__(cls, registry: Registry, uid: object = object) -> Self | Entity:
8686
"""Return a unique entity for the given `registry` and `uid`.
8787
8888
If an entity already exists with a matching `registry` and `uid` then that entity is returned.

0 commit comments

Comments
 (0)