Skip to content

Commit

Permalink
fix format, add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Moysenko committed Oct 22, 2023
1 parent 42cfa41 commit dceb1a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/libtmux/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,9 @@ def kill_window(self, target_window: t.Optional[t.Union[str, int]] = None) -> No
Parameters
----------
target_window : str, optional
window to kill
target_window : str, int, optional
window to kill. Stands for a window id in the format "@{id}",
if str, a window index if int, and an attached window if none.
"""

kill_cmd = ["kill-window"]
Expand Down
3 changes: 2 additions & 1 deletion tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def test_new_window_with_environment_logs_warning_for_old_tmux(
"Cannot set up environment" in record.msg for record in caplog.records
), "Warning missing"


@pytest.mark.parametrize(
"target_window_mapper",
[
Expand All @@ -334,7 +335,7 @@ def test_new_window_with_environment_logs_warning_for_old_tmux(
def test_kill_window_by_id(
session: Session,
target_window_mapper: t.Callable[[Window], t.Optional[t.Union[int, str]]],
):
) -> None:
# kill by window index
session.new_window()
w = session.attached_window
Expand Down

0 comments on commit dceb1a6

Please sign in to comment.