11from abc import ABC , abstractmethod
2- from typing import List , Optional , Tuple , Union , Literal
2+ from typing import Optional , Union , Literal
33
44from pygame .typing import IntPoint
55
66from pygame .surface import Surface
77
8- def get_backends () -> List [str ]: ...
8+ def get_backends () -> list [str ]: ...
99def init (backend : Optional [str ] = None ) -> None : ...
1010def quit () -> None : ...
11- def list_cameras () -> List [str ]: ...
11+ def list_cameras () -> list [str ]: ...
1212def colorspace (
1313 surface : Surface , color : Literal ["YUV" , "HSV" ], dest_surface : Surface = ..., /
1414) -> Surface : ...
@@ -21,7 +21,7 @@ class AbstractCamera(ABC):
2121 @abstractmethod
2222 def stop (self ) -> None : ...
2323 @abstractmethod
24- def get_size (self ) -> Tuple [int , int ]: ...
24+ def get_size (self ) -> tuple [int , int ]: ...
2525 @abstractmethod
2626 def query_image (self ) -> bool : ...
2727 @abstractmethod
@@ -41,14 +41,14 @@ class Camera(AbstractCamera):
4141 ) -> None : ...
4242 def start (self ) -> None : ...
4343 def stop (self ) -> None : ...
44- def get_controls (self ) -> Tuple [bool , bool , int ]: ...
44+ def get_controls (self ) -> tuple [bool , bool , int ]: ...
4545 def set_controls (
4646 self ,
4747 hflip : bool = ...,
4848 vflip : bool = ...,
4949 brightness : int = ...,
50- ) -> Tuple [bool , bool , int ]: ...
51- def get_size (self ) -> Tuple [int , int ]: ...
50+ ) -> tuple [bool , bool , int ]: ...
51+ def get_size (self ) -> tuple [int , int ]: ...
5252 def query_image (self ) -> bool : ...
5353 def get_image (self , surface : Optional [Surface ] = None ) -> Surface : ...
5454 def get_raw (self ) -> bytes : ...
0 commit comments