@@ -51,9 +51,9 @@ def is_click(a: ButtonEvent, b: ButtonEvent) -> bool:
5151
5252class KittenUI :
5353 allow_remote_control : bool = False
54- remote_control_password : bool | str = False
54+ remote_control_password : Union [ bool , str ] = False
5555
56- def __init__ (self , func : Callable [[list [str ]], str ], allow_remote_control : bool , remote_control_password : bool | str ):
56+ def __init__ (self , func : Callable [[list [str ]], str ], allow_remote_control : bool , remote_control_password : Union [ bool , str ] ):
5757 self .func = func
5858 self .allow_remote_control = allow_remote_control
5959 self .remote_control_password = remote_control_password
@@ -94,7 +94,7 @@ def allow_indiscriminate_remote_control(self, enable: bool = True) -> None:
9494 if self .password :
9595 os .environ .pop ('KITTY_RC_PASSWORD' , None )
9696
97- def remote_control (self , cmd : str | Sequence [str ], ** kw : Any ) -> Any :
97+ def remote_control (self , cmd : Union [ str , Sequence [str ] ], ** kw : Any ) -> Any :
9898 if not self .allow_remote_control :
9999 raise ValueError ('Remote control is not enabled, remember to use allow_remote_control=True' )
100100 prefix = [kitten_exe (), '@' ]
@@ -132,7 +132,7 @@ def remote_control(self, cmd: str | Sequence[str], **kw: Any) -> Any:
132132
133133def kitten_ui (
134134 allow_remote_control : bool = KittenUI .allow_remote_control ,
135- remote_control_password : bool | str = KittenUI .allow_remote_control ,
135+ remote_control_password : Union [ bool , str ] = KittenUI .allow_remote_control ,
136136) -> Callable [[Callable [[list [str ]], str ]], KittenUI ]:
137137
138138 def wrapper (impl : Callable [..., Any ]) -> KittenUI :
0 commit comments