Skip to content

Commit a641f20

Browse files
committed
util: Note pydocstyle updates
1 parent 0915ec1 commit a641f20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tmuxp/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
def run_before_script(
3131
script_file: t.Union[str, pathlib.Path], cwd: t.Optional[pathlib.Path] = None
3232
) -> int:
33-
"""Function to wrap try/except for subprocess.check_call()."""
33+
"""Execute a shell script, wraps :meth:`subprocess.check_call()` in a try/catch."""
3434
try:
3535
proc = subprocess.Popen(
3636
shlex.split(str(script_file)),
@@ -105,6 +105,7 @@ def get_session(
105105
session_name: t.Optional[str] = None,
106106
current_pane: t.Optional["Pane"] = None,
107107
) -> "Session":
108+
"""Get tmux session for server by session name, respects current pane, if passed."""
108109
try:
109110
if session_name:
110111
session = server.sessions.get(session_name=session_name)
@@ -131,6 +132,7 @@ def get_window(
131132
window_name: t.Optional[str] = None,
132133
current_pane: t.Optional["Pane"] = None,
133134
) -> "Window":
135+
"""Get tmux window for server by window name, respects current pane, if passed."""
134136
try:
135137
if window_name:
136138
window = session.windows.get(window_name=window_name)
@@ -150,6 +152,7 @@ def get_window(
150152

151153

152154
def get_pane(window: "Window", current_pane: t.Optional["Pane"] = None) -> "Pane":
155+
"""Get tmux pane for server by pane name, respects current pane, if passed."""
153156
pane = None
154157
try:
155158
if current_pane is not None:

0 commit comments

Comments
 (0)