Skip to content

Commit a9487a6

Browse files
committed
options(docs): Update g parameter docstrings to reflect DeprecatedError
why: Docstrings still described g as functional when it now raises error what: - Update 6 docstring locations to indicate g raises DeprecatedError - Add deprecation directive pointing to global_ replacement
1 parent be6a91a commit a9487a6

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

src/libtmux/options.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,9 @@ def _show_options_raw(
795795
796796
Parameters
797797
----------
798-
g : str, optional
799-
Pass ``-g`` flag for global variable, default False.
798+
g : bool, optional
799+
.. deprecated:: 0.50.0
800+
Use ``global_`` instead. Raises :exc:`~libtmux.exc.DeprecatedError`.
800801
801802
Examples
802803
--------
@@ -862,8 +863,9 @@ def _show_options_dict(
862863
863864
Parameters
864865
----------
865-
g : str, optional
866-
Pass ``-g`` flag for global variable, default False.
866+
g : bool, optional
867+
.. deprecated:: 0.50.0
868+
Use ``global_`` instead. Raises :exc:`~libtmux.exc.DeprecatedError`.
867869
868870
Examples
869871
--------
@@ -911,8 +913,9 @@ def _show_options(
911913
912914
Parameters
913915
----------
914-
g : str, optional
915-
Pass ``-g`` flag for global variable, default False.
916+
g : bool, optional
917+
.. deprecated:: 0.50.0
918+
Use ``global_`` instead. Raises :exc:`~libtmux.exc.DeprecatedError`.
916919
917920
Examples
918921
--------
@@ -1011,7 +1014,8 @@ def _show_option_raw(
10111014
----------
10121015
option : str
10131016
g : bool, optional
1014-
Pass ``-g`` flag, global. Default False.
1017+
.. deprecated:: 0.50.0
1018+
Use ``global_`` instead. Raises :exc:`~libtmux.exc.DeprecatedError`.
10151019
10161020
Raises
10171021
------
@@ -1102,7 +1106,8 @@ def _show_option(
11021106
----------
11031107
option : str
11041108
g : bool, optional
1105-
Pass ``-g`` flag, global. Default False.
1109+
.. deprecated:: 0.50.0
1110+
Use ``global_`` instead. Raises :exc:`~libtmux.exc.DeprecatedError`.
11061111
11071112
Raises
11081113
------
@@ -1204,7 +1209,8 @@ def show_option(
12041209
----------
12051210
option : str
12061211
g : bool, optional
1207-
Pass ``-g`` flag, global. Default False.
1212+
.. deprecated:: 0.50.0
1213+
Use ``global_`` instead. Raises :exc:`~libtmux.exc.DeprecatedError`.
12081214
12091215
Raises
12101216
------

0 commit comments

Comments
 (0)