Typing update

This commit is contained in:
DevilXD committed 2022-07-31 21:40:03 +02:00
1 parent 7a7b94f57c
commit f919850ad2
6 files changed
+10 -10

No files matched your search

+2 -2
View File
@@ -261,7 +261,7 @@ class AwaitableValue(Generic[_T]):
return self._event.is_set()
def wait(self) -> abc.Coroutine[Any, Any, Literal[True]]:
return cast("abc.Coroutine[Any, Any, Literal[True]]", self._event.wait())
return self._event.wait()
def get_with_default(self, default: _D) -> _T | _D:
if self._event.is_set():
@@ -291,7 +291,7 @@ class Game:
def __repr__(self) -> str:
return f"Game({self.id}, {self.name})"
def __eq__(self, other: object):
def __eq__(self, other: object) -> bool:
if isinstance(other, self.__class__):
return self.id == other.id
return NotImplemented