@@ -92,13 +92,18 @@ def __init__(
9292 self .colors = colors
9393
9494 def cmd (self , * args , ** kwargs ):
95- """Execute tmux command and return output.
95+ """
96+ Execute tmux command and return output.
9697
97- :rtype: :class:`common.tmux_cmd`
98+ Returns
99+ -------
100+ :class:`common.tmux_cmd`
98101
102+ Notes
103+ -----
99104 .. versionchanged:: 0.8
100- Renamed from ``.tmux`` to ``.cmd``.
101105
106+ Renamed from ``.tmux`` to ``.cmd``.
102107 """
103108
104109 args = list (args )
@@ -119,15 +124,17 @@ def cmd(self, *args, **kwargs):
119124 return tmux_cmd (* args , ** kwargs )
120125
121126 def _list_sessions (self ):
122- """Return list of sessions in :py:obj:`dict` form.
127+ """
128+ Return list of sessions in :py:obj:`dict` form.
123129
124130 Retrieved from ``$ tmux(1) list-sessions`` stdout.
125131
126132 The :py:obj:`list` is derived from ``stdout`` in
127133 :class:`common.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
128134
129- :rtype: :py:obj:`list` of :py:obj:`dict`
130-
135+ Returns
136+ -------
137+ list of dict
131138 """
132139
133140 sformats = formats .SESSION_FORMATS
@@ -168,10 +175,12 @@ def _sessions(self):
168175 return self ._list_sessions ()
169176
170177 def list_sessions (self ):
171- """Return list of :class:`Session` from the ``tmux(1)`` session.
172-
173- :rtype: :py:obj:`list` of :class:`Session`
178+ """
179+ Return list of :class:`Session` from the ``tmux(1)`` session.
174180
181+ Returns
182+ -------
183+ list of :class:`Session`
175184 """
176185 return [
177186 Session (server = self , ** s ) for s in self ._sessions
@@ -185,15 +194,17 @@ def sessions(self):
185194 children = sessions
186195
187196 def _list_windows (self ):
188- """Return list of windows in :py:obj:`dict` form.
197+ """
198+ Return list of windows in :py:obj:`dict` form.
189199
190200 Retrieved from ``$ tmux(1) list-windows`` stdout.
191201
192202 The :py:obj:`list` is derived from ``stdout`` in
193203 :class:`common.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
194204
195- :rtype: list
196-
205+ Returns
206+ -------
207+ list of dict
197208 """
198209
199210 wformats = ['session_name' , 'session_id' ] + formats .WINDOW_FORMATS
@@ -234,24 +245,28 @@ def _list_windows(self):
234245 return self ._windows
235246
236247 def _update_windows (self ):
237- """Update internal window data and return ``self`` for chainability.
238-
239- :rtype: :class:`Server`
248+ """
249+ Update internal window data and return ``self`` for chainability.
240250
251+ Returns
252+ -------
253+ :class:`Server`
241254 """
242255 self ._list_windows ()
243256 return self
244257
245258 def _list_panes (self ):
246- """Return list of panes in :py:obj:`dict` form.
259+ """
260+ Return list of panes in :py:obj:`dict` form.
247261
248262 Retrieved from ``$ tmux(1) list-panes`` stdout.
249263
250264 The :py:obj:`list` is derived from ``stdout`` in
251265 :class:`util.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
252266
253- :rtype: list
254-
267+ Returns
268+ -------
269+ list
255270 """
256271
257272 pformats = [
@@ -300,22 +315,26 @@ def _list_panes(self):
300315 return self ._panes
301316
302317 def _update_panes (self ):
303- """Update internal pane data and return ``self`` for chainability.
304-
305- :rtype: :class:`Server`
318+ """
319+ Update internal pane data and return ``self`` for chainability.
306320
321+ Returns
322+ -------
323+ :class:`Server`
307324 """
308325 self ._list_panes ()
309326 return self
310327
311328 @property
312329 def attached_sessions (self ):
313- """Return active :class:`Session` objects.
330+ """
331+ Return active :class:`Session` objects.
314332
315333 This will not work where multiple tmux sessions are attached.
316334
317- :rtype: :py:obj:`list` of :class:`Session`
318-
335+ Returns
336+ -------
337+ list of :class:`Session`
319338 """
320339
321340 sessions = self ._sessions
0 commit comments