Skip to content

Commit 189114c

Browse files
committed
tweaks to api docs / interlinking fixes
1 parent e54e356 commit 189114c

File tree

5 files changed

+28
-27
lines changed

5 files changed

+28
-27
lines changed

libtmux/common.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class tmux_cmd(object):
156156
157157
$ tmux new-session -s my session
158158
159-
:versionchanged: 0.8
159+
.. versionchanged:: 0.8
160160
Renamed from ``tmux`` to ``tmux_cmd``.
161161
162162
"""
@@ -298,7 +298,7 @@ class TmuxRelationalObject(object):
298298
def find_where(self, attrs):
299299
"""Return object on first match.
300300
301-
:versionchanged: 0.4
301+
.. versionchanged:: 0.4
302302
Renamed from ``.findWhere`` to ``.find_where``.
303303
304304
"""
@@ -498,9 +498,10 @@ def has_minimum_version(raises=True):
498498
:returns: True if tmux meets minimum required version
499499
:rtype: bool
500500
501-
:versionchanged: 0.7.0
501+
.. versionchanged:: 0.7.0
502502
No longer returns version, returns True or False
503-
:versionchanged: 0.1.7
503+
504+
.. versionchanged:: 0.1.7
504505
Versions will now remove trailing letters per `Issue 55`_.
505506
506507
.. _Issue 55: https://github.com/tony/tmuxp/issues/55.
@@ -557,7 +558,7 @@ def handle_option_error(error):
557558
:param error: error response from subprocess call
558559
:type error: str
559560
:raises: :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
560-
:exc:`exc.InvalidOption`, :exc:`excAmbiguousOption`
561+
:exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`
561562
"""
562563
if 'unknown option' in error:
563564
raise exc.UnknownOption(error)

libtmux/pane.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class Pane(TmuxMappingObject, TmuxRelationalObject):
2121
2222
:param window: :class:`Window`
2323
24-
:versionchanged: 0.8
24+
.. versionchanged:: 0.8
2525
Renamed from ``.tmux`` to ``.cmd``.
2626
"""
27-
#: namespace used :class:`TmuxMappingObject`
27+
#: namespace used :class:`~libtmux.common.TmuxMappingObject`
2828
formatter_prefix = 'pane_'
2929

3030
def __init__(self, window=None, **kwargs):

libtmux/server.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class Server(TmuxRelationalObject, EnvironmentMixin):
4242
config_file = None
4343
#: ``-2`` or ``-8``
4444
colors = None
45-
#: unique child ID key used by :class:`TmuxRelationalObject`
45+
#: unique child ID used by :class:`~libtmux.common.TmuxRelationalObject`
4646
child_id_attribute = 'session_id'
47-
#: namespace used :class:`TmuxMappingObject`
47+
#: namespace used :class:`~libtmux.common.TmuxMappingObject`
4848
formatter_prefix = 'server_'
4949

5050
def __init__(
@@ -72,11 +72,11 @@ def __init__(
7272
self.colors = colors
7373

7474
def cmd(self, *args, **kwargs):
75-
"""Return :class:`util.tmux_cmd` send tmux commands with sockets, colors.
75+
"""Execute tmux command and return output.
7676
77-
:rtype: :class:`util.tmux_cmd`
77+
:rtype: :class:`common.tmux_cmd`
7878
79-
:versionchanged: 0.8
79+
.. versionchanged:: 0.8
8080
Renamed from ``.tmux`` to ``.cmd``.
8181
8282
"""
@@ -103,8 +103,8 @@ def _list_sessions(self):
103103
104104
Retrieved from ``$ tmux(1) list-sessions`` stdout.
105105
106-
The :py:obj:`list` is derived from ``stdout`` in :class:`util.tmux_cmd`
107-
which wraps :py:class:`subprocess.Popen`.
106+
The :py:obj:`list` is derived from ``stdout`` in
107+
:class:`common.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
108108
109109
:rtype: :py:obj:`list` of :py:obj:`dict`
110110
@@ -161,16 +161,16 @@ def list_sessions(self):
161161
def sessions(self):
162162
"""Property / alias to return :meth:`~.list_sessions`."""
163163
return self.list_sessions()
164-
#: Alias of :attr:`sessions`, , used by :class:`TmuxRelationalObject`
164+
#: Alias :attr:`sessions` for :class:`~libtmux.common.TmuxRelationalObject`
165165
children = sessions
166166

167167
def _list_windows(self):
168168
"""Return list of windows in :py:obj:`dict` form.
169169
170170
Retrieved from ``$ tmux(1) list-windows`` stdout.
171171
172-
The :py:obj:`list` is derived from ``stdout`` in :class:`util.tmux_cmd`
173-
which wraps :py:class:`subprocess.Popen`.
172+
The :py:obj:`list` is derived from ``stdout`` in
173+
:class:`common.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
174174
175175
:rtype: list
176176
@@ -227,8 +227,8 @@ def _list_panes(self):
227227
228228
Retrieved from ``$ tmux(1) list-panes`` stdout.
229229
230-
The :py:obj:`list` is derived from ``stdout`` in :class:`util.tmux_cmd`
231-
which wraps :py:class:`subprocess.Popen`.
230+
The :py:obj:`list` is derived from ``stdout`` in
231+
:class:`util.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
232232
233233
:rtype: list
234234

libtmux/session.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class Session(
2828
Holds :class:`Window` objects.
2929
"""
3030

31-
#: unique child ID key used by :class:`TmuxRelationalObject`
31+
#: unique child ID key for :class:`~libtmux.common.TmuxRelationalObject`
3232
child_id_attribute = 'window_id'
33-
#: namespace used :class:`TmuxMappingObject`
33+
#: namespace used :class:`~libtmux.common.TmuxMappingObject`
3434
formatter_prefix = 'session_'
3535

3636
def __init__(self, server=None, **kwargs):
@@ -68,7 +68,7 @@ def cmd(self, *args, **kwargs):
6868
6969
:rtype: :class:`server.cmd`
7070
71-
:versionchanged: 0.8
71+
.. versionchanged:: 0.8
7272
Renamed from ``.tmux`` to ``.cmd``.
7373
7474
"""
@@ -261,7 +261,7 @@ def windows(self):
261261
"""Property / alias to return :meth:`Session.list_windows`."""
262262
return self.list_windows()
263263

264-
#: Alias of :attr:`windows`, used by :class:`TmuxRelationalObject`
264+
#: Alias :attr:`windows` for :class:`~libtmux.common.TmuxRelationalObject`
265265
children = windows
266266

267267
@property

libtmux/window.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
class Window(TmuxMappingObject, TmuxRelationalObject):
2424
""":term:`tmux(1)` window."""
2525

26-
#: unique child ID key used by :class:`TmuxRelationalObject`
26+
#: unique child ID key for :class:`~libtmux.common.TmuxRelationalObject`
2727
child_id_attribute = 'pane_id'
28-
#: namespace used :class:`TmuxMappingObject`
28+
#: namespace used :class:`~libtmux.common.TmuxMappingObject`
2929
formatter_prefix = 'window_'
3030

3131
def __init__(self, session=None, **kwargs):
@@ -85,7 +85,7 @@ def cmd(self, cmd, *args, **kwargs):
8585
8686
:rtype: :class:`Server.cmd`
8787
88-
:versionchanged: 0.8
88+
.. versionchanged:: 0.8
8989
Renamed from ``.tmux`` to ``.cmd``.
9090
9191
"""
@@ -478,5 +478,5 @@ def panes(self):
478478
"""Property / alias to return :meth:`~.list_panes`."""
479479
return self.list_panes()
480480

481-
#: Alias of :attr:`panes`, used by :class:`TmuxRelationalObject`
481+
#: Alias :attr:`panes` for :class:`~libtmux.common.TmuxRelationalObject`
482482
children = panes

0 commit comments

Comments
 (0)