Skip to content

Commit

Permalink
[multiset] Fix typing for eq() and ne()
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometheus3375 committed Jul 18, 2024
1 parent 31e2469 commit 4ad9dfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions solve/multiset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import Counter
from collections.abc import Iterable, Iterator, Set
from itertools import product
from typing import Self
from typing import Any, Self


@Set.register
Expand Down Expand Up @@ -106,7 +106,7 @@ def isdisjoint(self, other: Set, /) -> bool:

return True

def __eq__(self, other: Set[T], /) -> bool:
def __eq__(self, other: Any, /) -> bool:
if isinstance(other, self.__class__):
return self._counter == other._counter

Expand All @@ -115,7 +115,7 @@ def __eq__(self, other: Set[T], /) -> bool:

return NotImplemented

def __ne__(self, other: Set[T], /) -> bool:
def __ne__(self, other: Any, /) -> bool:
if isinstance(other, self.__class__):
return self._counter != other._counter

Expand Down

0 comments on commit 4ad9dfc

Please sign in to comment.