1- import sys
2- from typing import Any , Dict , Iterator , SupportsIndex , Tuple , Union , overload
3- from typing_extensions import deprecated # added in 3.13
1+ from collections . abc import Collection , Iterator
2+ from typing import Any , SupportsIndex , Union , overload
3+ from typing_extensions import deprecated # added in 3.13
44
55from pygame .typing import ColorLike
66
7- if sys .version_info >= (3 , 9 ):
8- from collections .abc import Collection
9- else :
10- from typing import Collection
11-
12- THECOLORS : Dict [str , Tuple [int , int , int , int ]]
7+ THECOLORS : dict [str , tuple [int , int , int , int ]]
138
149# Color confirms to the Collection ABC, since it also confirms to
1510# Sized, Iterable and Container ABCs
@@ -18,11 +13,11 @@ class Color(Collection[int]):
1813 g : int
1914 b : int
2015 a : int
21- cmy : Tuple [float , float , float ]
22- hsva : Tuple [float , float , float , float ]
23- hsla : Tuple [float , float , float , float ]
24- i1i2i3 : Tuple [float , float , float ]
25- normalized : Tuple [float , float , float , float ]
16+ cmy : tuple [float , float , float ]
17+ hsva : tuple [float , float , float , float ]
18+ hsla : tuple [float , float , float , float ]
19+ i1i2i3 : tuple [float , float , float ]
20+ normalized : tuple [float , float , float , float ]
2621 __hash__ : None # type: ignore
2722 __array_struct__ : Any
2823 @overload
@@ -32,7 +27,7 @@ class Color(Collection[int]):
3227 @overload
3328 def __getitem__ (self , i : SupportsIndex ) -> int : ...
3429 @overload
35- def __getitem__ (self , s : slice ) -> Tuple [int , ...]: ...
30+ def __getitem__ (self , s : slice ) -> tuple [int , ...]: ...
3631 def __setitem__ (self , key : int , value : int ) -> None : ...
3732 def __iter__ (self ) -> Iterator [int ]: ...
3833 def __add__ (self , other : Color ) -> Color : ...
@@ -50,35 +45,35 @@ class Color(Collection[int]):
5045 def __setattr__ (self , attr : str , value : Union [Color , tuple ]) -> None : ...
5146 @overload
5247 @classmethod
53- def from_cmy (cls , object : Tuple [float , float , float ], / ) -> Color : ...
48+ def from_cmy (cls , object : tuple [float , float , float ], / ) -> Color : ...
5449 @overload
5550 @classmethod
5651 def from_cmy (cls , c : float , m : float , y : float , / ) -> Color : ...
5752 @overload
5853 @classmethod
59- def from_hsva (cls , object : Tuple [float , float , float , float ], / ) -> Color : ...
54+ def from_hsva (cls , object : tuple [float , float , float , float ], / ) -> Color : ...
6055 @overload
6156 @classmethod
6257 def from_hsva (cls , h : float , s : float , v : float , a : float , / ) -> Color : ...
6358 @overload
6459 @classmethod
65- def from_hsla (cls , object : Tuple [float , float , float , float ], / ) -> Color : ...
60+ def from_hsla (cls , object : tuple [float , float , float , float ], / ) -> Color : ...
6661 @overload
6762 @classmethod
6863 def from_hsla (cls , h : float , s : float , l : float , a : float , / ) -> Color : ...
6964 @overload
7065 @classmethod
71- def from_i1i2i3 (cls , object : Tuple [float , float , float ], / ) -> Color : ...
66+ def from_i1i2i3 (cls , object : tuple [float , float , float ], / ) -> Color : ...
7267 @overload
7368 @classmethod
7469 def from_i1i2i3 (cls , i1 : float , i2 : float , i3 : float , / ) -> Color : ...
7570 @overload
7671 @classmethod
77- def from_normalized (cls , object : Tuple [float , float , float , float ], / ) -> Color : ...
72+ def from_normalized (cls , object : tuple [float , float , float , float ], / ) -> Color : ...
7873 @overload
7974 @classmethod
8075 def from_normalized (cls , r : float , g : float , b : float , a : float , / ) -> Color : ...
81- def normalize (self ) -> Tuple [float , float , float , float ]: ...
76+ def normalize (self ) -> tuple [float , float , float , float ]: ...
8277 def correct_gamma (self , gamma : float , / ) -> Color : ...
8378 @deprecated ("since 2.1.3. Use unpacking instead" )
8479 def set_length (self , length : int , / ) -> None : ...
0 commit comments