Skip to content

Commit 752e21b

Browse files
committed
Add documentation for exceptions to option methods
1 parent 270fcce commit 752e21b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

libtmux/session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ def show_option(self, option, g=False):
399399
:param global: check for option globally across all servers (-g)
400400
:type global: bool
401401
:rtype: string, int or bool
402+
:raises: :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
403+
:exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`
402404
403405
"""
404406

libtmux/window.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,13 @@ def select_layout(self, layout=None):
130130
def set_window_option(self, option, value):
131131
"""Wrapper for ``$ tmux set-window-option <option> <value>``.
132132
133+
:param option: option to set, e.g. 'aggressive-resize'
134+
:type option: str
133135
:param value: window value. True/False will turn in 'on' and 'off',
134136
also accepts string of 'on' or 'off' directly.
135137
:type value: bool
136-
138+
:raises: :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
139+
:exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`
137140
"""
138141

139142
self.server._update_windows()
@@ -200,6 +203,8 @@ def show_window_option(self, option, g=False):
200203
:param g: Pass ``-g`` flag, global.
201204
:type g: bool
202205
:rtype: string, int
206+
:raises: :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
207+
:exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`
203208
204209
"""
205210

0 commit comments

Comments
 (0)