Skip to content

Commit 4a30958

Browse files
committed
chore(session): pydocstyle manual fixes
1 parent 57c9868 commit 4a30958

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libtmux/session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ class Session(Obj, EnvironmentMixin):
7575
server: "Server"
7676

7777
def refresh(self) -> None:
78+
"""Refresh session attributes from tmux."""
7879
assert isinstance(self.session_id, str)
7980
return super()._refresh(
8081
obj_key="session_id", obj_id=self.session_id, list_cmd="list-sessions"
8182
)
8283

8384
@classmethod
8485
def from_session_id(cls, server: "Server", session_id: str) -> "Session":
86+
"""Create Session from existing session_id."""
8587
session = fetch_obj(
8688
obj_key="session_id",
8789
obj_id=session_id,
@@ -552,11 +554,13 @@ def attached_pane(self) -> t.Optional["Pane"]:
552554
# Dunder
553555
#
554556
def __eq__(self, other: object) -> bool:
557+
"""Equal operator for :class:`Session` object."""
555558
if isinstance(other, Session):
556559
return self.session_id == other.session_id
557560
return False
558561

559562
def __repr__(self) -> str:
563+
"""Representation of :class:`Session` object."""
560564
return f"{self.__class__.__name__}({self.session_id} {self.session_name})"
561565

562566
#

0 commit comments

Comments
 (0)