11from collections .abc import Collection , Iterator
2- from typing import Any , SupportsIndex , Union , overload
2+ from typing import Any , ClassVar , SupportsIndex , Union , overload
33from typing_extensions import deprecated # added in 3.13
44
55from pygame .typing import ColorLike
@@ -18,8 +18,9 @@ class Color(Collection[int]):
1818 hsla : tuple [float , float , float , float ]
1919 i1i2i3 : tuple [float , float , float ]
2020 normalized : tuple [float , float , float , float ]
21- __hash__ : None # type: ignore
22- __array_struct__ : Any
21+ __hash__ : ClassVar [None ] # type: ignore[assignment]
22+ @property
23+ def __array_struct__ (self ) -> Any : ...
2324 @overload
2425 def __init__ (self , r : int , g : int , b : int , a : int = 255 ) -> None : ...
2526 @overload
@@ -41,8 +42,8 @@ class Color(Collection[int]):
4142 def __index__ (self ) -> int : ...
4243 def __invert__ (self ) -> Color : ...
4344 def __contains__ (self , other : int ) -> bool : ... # type: ignore[override]
44- def __getattribute__ (self , attr : str ) -> Union [Color , tuple [int , ...]]: ...
45- def __setattr__ (self , attr : str , value : Union [Color , tuple [int , ...]]) -> None : ...
45+ def __getattribute__ (self , name : str ) -> Union [Color , tuple [int , ...]]: ...
46+ def __setattr__ (self , name : str , value : Union [Color , tuple [int , ...]]) -> None : ...
4647 @overload
4748 @classmethod
4849 def from_cmy (cls , object : tuple [float , float , float ], / ) -> Color : ...
0 commit comments