Fix typing issues and improve typing completeness across the library

Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
This commit is contained in:
Stocker
2022-03-13 23:52:10 -04:00
committed by GitHub
parent 603681940f
commit 5aa696ccfa
66 changed files with 1071 additions and 802 deletions

View File

@ -211,7 +211,7 @@ class Role(Hashable):
def __repr__(self) -> str:
return f'<Role id={self.id} name={self.name!r}>'
def __lt__(self, other: Any) -> bool:
def __lt__(self, other: object) -> bool:
if not isinstance(other, Role) or not isinstance(self, Role):
return NotImplemented
@ -241,7 +241,7 @@ class Role(Hashable):
def __gt__(self, other: Any) -> bool:
return Role.__lt__(other, self)
def __ge__(self, other: Any) -> bool:
def __ge__(self, other: object) -> bool:
r = Role.__lt__(self, other)
if r is NotImplemented:
return NotImplemented