Skip to content

Commit 147ecc5

Browse files
committed
chore(window): pydocstyle manual fixes
1 parent 9a2859a commit 147ecc5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/libtmux/window.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class Window(Obj):
8080
server: "Server"
8181

8282
def refresh(self) -> None:
83+
"""Refresh window attributes from tmux."""
8384
assert isinstance(self.window_id, str)
8485
return super()._refresh(
8586
obj_key="window_id",
@@ -89,6 +90,7 @@ def refresh(self) -> None:
8990

9091
@classmethod
9192
def from_window_id(cls, server: "Server", window_id: str) -> "Window":
93+
"""Create Window from existing window_id."""
9294
window = fetch_obj(
9395
obj_key="window_id",
9496
obj_id=window_id,
@@ -100,6 +102,7 @@ def from_window_id(cls, server: "Server", window_id: str) -> "Window":
100102

101103
@property
102104
def session(self) -> "Session":
105+
"""Parent session of window."""
103106
assert isinstance(self.session_id, str)
104107
from libtmux.session import Session
105108

@@ -282,7 +285,9 @@ def last_pane(self) -> t.Optional["Pane"]:
282285
return self.select_pane("-l")
283286

284287
def select_layout(self, layout: t.Optional[str] = None) -> "Window":
285-
"""Wrapper for ``$ tmux select-layout <layout>``.
288+
"""Select layout for window.
289+
290+
Wrapper for ``$ tmux select-layout <layout>``.
286291
287292
Parameters
288293
----------
@@ -323,8 +328,9 @@ def select_layout(self, layout: t.Optional[str] = None) -> "Window":
323328
return self
324329

325330
def set_window_option(self, option: str, value: t.Union[int, str]) -> "Window":
326-
"""
327-
Wrapper for ``$ tmux set-window-option <option> <value>``.
331+
"""Set option for tmux window.
332+
333+
Wraps ``$ tmux set-window-option <option> <value>``.
328334
329335
Parameters
330336
----------
@@ -547,11 +553,13 @@ def attached_pane(self) -> t.Optional["Pane"]:
547553
# Dunder
548554
#
549555
def __eq__(self, other: object) -> bool:
556+
"""Equal operator for :class:`Window` object."""
550557
if isinstance(other, Window):
551558
return self.window_id == other.window_id
552559
return False
553560

554561
def __repr__(self) -> str:
562+
"""Representation of :class:`Window` object."""
555563
return "{}({} {}:{}, {})".format(
556564
self.__class__.__name__,
557565
self.window_id,

0 commit comments

Comments
 (0)