From 4ad9dfc654662c4d83f7429d98313fc57b73b293 Mon Sep 17 00:00:00 2001 From: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:25:18 +0300 Subject: [PATCH] [multiset] Fix typing for eq() and ne() --- solve/multiset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solve/multiset.py b/solve/multiset.py index f8d2d49..9d6afad 100644 --- a/solve/multiset.py +++ b/solve/multiset.py @@ -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 @@ -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 @@ -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