diff options
| author | Gnome! <[email protected]> | 2021-07-29 00:55:19 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-28 19:55:19 -0400 |
| commit | 67026809a8b99728a9d560ffede8413602fcb46e (patch) | |
| tree | 5462df0396f2eba9ead760c4b0ead530fca24a39 /discord | |
| parent | Fix a typo within the documentation (diff) | |
| download | discord.py-67026809a8b99728a9d560ffede8413602fcb46e.tar.xz discord.py-67026809a8b99728a9d560ffede8413602fcb46e.zip | |
Fix EqualityComparable.__eq__ typing
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/mixins.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/discord/mixins.py b/discord/mixins.py index 3eca279f..32ee222b 100644 --- a/discord/mixins.py +++ b/discord/mixins.py @@ -22,24 +22,20 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from typing import TypeVar - __all__ = ( 'EqualityComparable', 'Hashable', ) -E = TypeVar('E', bound='EqualityComparable') - class EqualityComparable: __slots__ = () id: int - def __eq__(self: E, other: E) -> bool: + def __eq__(self, other: object) -> bool: return isinstance(other, self.__class__) and other.id == self.id - def __ne__(self: E, other: E) -> bool: + def __ne__(self, other: object) -> bool: if isinstance(other, self.__class__): return other.id != self.id return True |