@@ -388,9 +388,7 @@ class TmuxRelationalObject(Generic[O, D]):
388388 children : t .List [O ]
389389 child_id_attribute : str
390390
391- def find_where (
392- self , attrs : Dict [str , str ]
393- ) -> Optional [Union ["Pane" , "Window" , "Session" ]]:
391+ def find_where (self , attrs : D ) -> Optional [Union ["Pane" , "Window" , "Session" ]]:
394392 """Return object on first match.
395393
396394 .. versionchanged:: 0.4
@@ -403,19 +401,18 @@ def find_where(
403401 return None
404402
405403 @overload
406- def where (self , attrs : Dict [ str , str ] , first : "Literal[True]" ) -> O :
404+ def where (self , attrs : D , first : "Literal[True]" ) -> O :
407405 ...
408406
409407 @overload
410- def where (self , attrs : Dict [ str , str ] , first : "Literal[False]" ) -> t .List [O ]:
408+ def where (self , attrs : D , first : "Literal[False]" ) -> t .List [O ]:
411409 ...
412410
413411 @overload
414- def where (self , attrs : Dict [ str , str ] ) -> t .List [O ]:
412+ def where (self , attrs : D ) -> t .List [O ]:
415413 ...
416414
417- def where (self , attrs : Dict [str , str ], first : bool = False ) -> t .Union [List [O ], O ]:
418- # ) -> List[Union["Session", "Pane", "Window", t.Any]]:
415+ def where (self , attrs : D , first : bool = False ) -> t .Union [List [O ], O ]:
419416 """
420417 Return objects matching child objects properties.
421418
@@ -426,7 +423,7 @@ def where(self, attrs: Dict[str, str], first: bool = False) -> t.Union[List[O],
426423
427424 Returns
428425 -------
429- list
426+ list of objects, or one object if ``first=True``
430427 """
431428
432429 # from https://github.com/serkanyersen/underscore.py
@@ -445,7 +442,7 @@ def by(val: O) -> bool:
445442 return target_children [0 ]
446443 return target_children
447444
448- def get_by_id (self , id : str ) -> Optional [Union [ "Pane" , "Window" , "Session" ] ]:
445+ def get_by_id (self , id : str ) -> Optional [O ]:
449446 """
450447 Return object based on ``child_id_attribute``.
451448
0 commit comments