8383
8484import enum
8585import warnings
86- from typing import Any , Callable , Generic , Iterator , Mapping , NamedTuple , TypeVar
86+ from typing import Any , Callable , Final , Generic , Iterator , Mapping , NamedTuple , TypeVar
8787
8888import numpy as np
8989from numpy .typing import NDArray
90- from typing_extensions import Final , Literal
90+ from typing_extensions import Literal
9191
9292import tcod .event_constants
9393import tcod .sdl .joystick
@@ -796,12 +796,7 @@ def __init__(self, x: int, y: int) -> None:
796796 self .y = y
797797
798798 def __repr__ (self ) -> str :
799- return "tcod.event.{}(type={!r}, x={!r}, y={!r})" .format (
800- self .__class__ .__name__ ,
801- self .type ,
802- self .x ,
803- self .y ,
804- )
799+ return f"tcod.event.{ self .__class__ .__name__ } (type={ self .type !r} , x={ self .x !r} , y={ self .y !r} )"
805800
806801 def __str__ (self ) -> str :
807802 return "<{}, x={!r}, y={!r})" .format (
@@ -828,12 +823,7 @@ def __init__(self, type: str, width: int, height: int) -> None:
828823 self .height = height
829824
830825 def __repr__ (self ) -> str :
831- return "tcod.event.{}(type={!r}, width={!r}, height={!r})" .format (
832- self .__class__ .__name__ ,
833- self .type ,
834- self .width ,
835- self .height ,
836- )
826+ return f"tcod.event.{ self .__class__ .__name__ } (type={ self .type !r} , width={ self .width !r} , height={ self .height !r} )"
837827
838828 def __str__ (self ) -> str :
839829 return "<{}, width={!r}, height={!r})" .format (
0 commit comments