Skip to content

Commit 9d2d986

Browse files
committed
!squash closer
1 parent 3ccbac6 commit 9d2d986

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libtmux/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def where(
376376
"""
377377

378378
# from https://github.com/serkanyersen/underscore.py
379-
def by(val) -> bool:
379+
def by(val: WindowDict) -> bool:
380380
for key in attrs.keys():
381381
try:
382382
if attrs[key] != val[key]:
@@ -385,8 +385,8 @@ def by(val) -> bool:
385385
return False
386386
return True
387387

388-
# TODO add type hint
389-
target_children = list(filter(by, self.children))
388+
target_children = [s for s in self.children if by(s)]
389+
390390
if first:
391391
return target_children[0]
392392
return target_children
@@ -679,7 +679,7 @@ def session_check_name(session_name: t.Optional[str]) -> None:
679679
)
680680

681681

682-
def handle_option_error(error: str):
682+
def handle_option_error(error: str) -> t.Type[exc.OptionError]:
683683
"""Raises exception if error in option command found.
684684
685685
In tmux 3.0, show-option and show-window-otion return invalid option instead of

0 commit comments

Comments
 (0)