Skip to content

Commit be75a9a

Browse files
Use types.NotImplementedType for Color.__eq__
1 parent 3c03e51 commit be75a9a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

stubs/colour/colour.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import re
22
from collections.abc import Callable, Generator, Hashable
3+
from types import NotImplementedType
34
from typing import Any, Final, final, overload
45
from typing_extensions import Self
56

@@ -89,7 +90,7 @@ class Color:
8990

9091
def set_web(self, value: str) -> None: ...
9192
def range_to(self, value: str | Color | None, steps: int) -> Generator[Color]: ...
92-
def __eq__(self, other: object) -> bool | type[NotImplemented]: ... # type: ignore[override, valid-type] # pyright: ignore[reportInvalidTypeForm]
93+
def __eq__(self, other: object) -> bool | NotImplementedType: ... # type: ignore[override]
9394

9495
RGB_equivalence: Final[Callable[[Color, Color], bool]]
9596
HSL_equivalence: Final[Callable[[Color, Color], bool]]

0 commit comments

Comments
 (0)