1313
1414if t .TYPE_CHECKING :
1515 ListCmd = t .Literal ["list-sessions" , "list-windows" , "list-panes" ]
16- ListExtraArgs = t . Optional [ Iterable [str ]]
16+ ListExtraArgs = Iterable [str ] | None
1717
1818 from libtmux .server import Server
1919
@@ -174,7 +174,7 @@ def _refresh(
174174 obj_key : str ,
175175 obj_id : str ,
176176 list_cmd : ListCmd = "list-panes" ,
177- list_extra_args : ListExtraArgs | None = None ,
177+ list_extra_args : ListExtraArgs = None ,
178178 ) -> None :
179179 assert isinstance (obj_id , str )
180180 obj = fetch_obj (
@@ -193,7 +193,7 @@ def _refresh(
193193def fetch_objs (
194194 server : Server ,
195195 list_cmd : ListCmd ,
196- list_extra_args : ListExtraArgs | None = None ,
196+ list_extra_args : ListExtraArgs = None ,
197197) -> OutputsRaw :
198198 """Fetch a listing of raw data from a tmux command."""
199199 formats = list (Obj .__dataclass_fields__ .keys ())
@@ -224,7 +224,7 @@ def fetch_objs(
224224 obj_output = proc .stdout
225225
226226 obj_formatters = [
227- dict (zip (formats , formatter .split (FORMAT_SEPARATOR )))
227+ dict (zip (formats , formatter .split (FORMAT_SEPARATOR ), strict = False ))
228228 for formatter in obj_output
229229 ]
230230
@@ -237,7 +237,7 @@ def fetch_obj(
237237 obj_key : str ,
238238 obj_id : str ,
239239 list_cmd : ListCmd = "list-panes" ,
240- list_extra_args : ListExtraArgs | None = None ,
240+ list_extra_args : ListExtraArgs = None ,
241241) -> OutputRaw :
242242 """Fetch raw data from tmux command."""
243243 obj_formatters_filtered = fetch_objs (
0 commit comments