@@ -93,7 +93,7 @@ def __init__(
9393 self ,
9494 width : int ,
9595 height : int ,
96- order : Union [ Literal ["C" ], Literal [ "F" ] ] = "C" ,
96+ order : Literal ["C" , "F" ] = "C" ,
9797 buffer : Optional [np .ndarray ] = None ,
9898 ):
9999 self ._key_color = None # type: Optional[Tuple[int, int, int]]
@@ -133,7 +133,7 @@ def __init__(
133133
134134 @classmethod
135135 def _from_cdata (
136- cls , cdata : Any , order : Union [ Literal ["C" ], Literal [ "F" ] ] = "C"
136+ cls , cdata : Any , order : Literal ["C" , "F" ] = "C"
137137 ) -> "Console" :
138138 """Return a Console instance which wraps this `TCOD_Console*` object."""
139139 if isinstance (cdata , cls ):
@@ -144,9 +144,7 @@ def _from_cdata(
144144 return self
145145
146146 @classmethod
147- def _get_root (
148- cls , order : Optional [Union [Literal ["C" ], Literal ["F" ]]] = None
149- ) -> "Console" :
147+ def _get_root (cls , order : Optional [Literal ["C" , "F" ]] = None ) -> "Console" :
150148 """Return a root console singleton with valid buffers.
151149
152150 This function will also update an already active root console.
@@ -161,9 +159,7 @@ def _get_root(
161159 self ._init_setup_console_data (self ._order )
162160 return self
163161
164- def _init_setup_console_data (
165- self , order : Union [Literal ["C" ], Literal ["F" ]] = "C"
166- ) -> None :
162+ def _init_setup_console_data (self , order : Literal ["C" , "F" ] = "C" ) -> None :
167163 """Setup numpy arrays over libtcod data buffers."""
168164 global _root_console
169165 self ._key_color = None
0 commit comments