Skip to content

Commit 056cfd9

Browse files
committed
chore(WorkspaceBuilder): Remove unneeded newlines, improve docs
1 parent 59aad83 commit 056cfd9

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

src/tmuxp/workspace/builder.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@
2727

2828

2929
class WorkspaceBuilder:
30+
"""Load workspace from workspace :py:obj:`dict` object.
3031
31-
"""
32-
Load workspace from session :py:obj:`dict`.
33-
34-
Build tmux workspace from a configuration. Creates and names windows, sets
35-
options, splits windows into panes.
32+
Build tmux workspace from a configuration. Creates and names windows, sets options,
33+
splits windows into panes.
3634
3735
Examples
3836
--------
@@ -145,8 +143,7 @@ def __init__(
145143
server: Server,
146144
plugins: t.List[t.Any] = [],
147145
) -> None:
148-
"""
149-
Initialize workspace loading.
146+
"""Initialize workspace loading.
150147
151148
Parameters
152149
----------
@@ -192,14 +189,12 @@ def session_exists(self, session_name: str) -> bool:
192189
return True
193190

194191
def build(self, session: t.Optional[Session] = None, append: bool = False) -> None:
195-
"""
196-
Build tmux workspace in session.
192+
"""Build tmux workspace in session.
197193
198194
Optionally accepts ``session`` to build with only session object.
199195
200-
Without ``session``, it will use :class:`libmtux.Server` at
201-
``self.server`` passed in on initialization to create a new Session
202-
object.
196+
Without ``session``, it will use :class:`libmtux.Server` at ``self.server``
197+
passed in on initialization to create a new Session object.
203198
204199
Parameters
205200
----------
@@ -318,8 +313,7 @@ def build(self, session: t.Optional[Session] = None, append: bool = False) -> No
318313
def iter_create_windows(
319314
self, session: Session, append: bool = False
320315
) -> t.Iterator[t.Any]:
321-
"""
322-
Return :class:`libtmux.Window` iterating through session config dict.
316+
"""Return :class:`libtmux.Window` iterating through session config dict.
323317
324318
Generator yielding :class:`libtmux.Window` by iterating through
325319
``sconf['windows']``.
@@ -417,8 +411,7 @@ def iter_create_windows(
417411
def iter_create_panes(
418412
self, w: Window, wconf: t.Dict[str, t.Any]
419413
) -> t.Iterator[t.Any]:
420-
"""
421-
Return :class:`libtmux.Pane` iterating through window config dict.
414+
"""Return :class:`libtmux.Pane` iterating through window config dict.
422415
423416
Run ``shell_command`` with ``$ tmux send-keys``.
424417

0 commit comments

Comments
 (0)