@@ -656,7 +656,7 @@ class WindowEvent(Event):
656656 type (str): A window event could mean various event types.
657657 """
658658
659- type : Final [ # type: ignore[misc] # Narrowing contant type.
659+ type : Final [ # type: ignore[misc] # Narrowing final type.
660660 Literal [
661661 "WindowShown" ,
662662 "WindowHidden" ,
@@ -726,7 +726,7 @@ class WindowMoved(WindowEvent):
726726 y (int): Movement on the y-axis.
727727 """
728728
729- type : Literal ["WINDOWMOVED" ] # type: ignore[assignment,misc]
729+ type : Final [ Literal ["WINDOWMOVED" ] ] # type: ignore[assignment,misc]
730730
731731 def __init__ (self , x : int , y : int ) -> None :
732732 super ().__init__ (None )
@@ -757,7 +757,7 @@ class WindowResized(WindowEvent):
757757 height (int): The current height of the window.
758758 """
759759
760- type : Literal ["WINDOWRESIZED" , "WINDOWSIZECHANGED" ] # type: ignore[assignment,misc]
760+ type : Final [ Literal ["WINDOWRESIZED" , "WINDOWSIZECHANGED" ] ] # type: ignore[assignment,misc]
761761
762762 def __init__ (self , type : str , width : int , height : int ) -> None :
763763 super ().__init__ (type )
@@ -962,6 +962,8 @@ class JoystickDevice(JoystickEvent):
962962 del joysticks[which]
963963 """
964964
965+ type = Final [Literal ["JOYDEVICEADDED" , "JOYDEVICEREMOVED" ]] # type: ignore[assignment,misc]
966+
965967 which : int
966968 """When type="JOYDEVICEADDED" this is the device ID.
967969 When type="JOYDEVICEREMOVED" this is the instance ID.
0 commit comments