Skip to content

Commit 015fdd4

Browse files
committed
docs(versionadded): annotate new params on existing methods with 0.45
why: New parameters added to existing public methods need versionadded annotations so users know when they became available. Several params were missing annotations while others in the same methods had them. what: - Add versionadded 0.45 to send_keys: reset, copy_mode_cmd, repeat - Add versionadded 0.45 to capture_pane: alternate_screen, quiet - Add versionadded 0.45 to display_message: format_string, all_formats, verbose, no_expand, target_client, delay, notify - Add versionadded 0.45 to select: direction, last, keep_zoom, mark, clear_mark, disable_input, enable_input - Add versionadded 0.45 to last_pane: detach, keep_zoom, disable_input - Add versionadded 0.45 to _show_options_raw: quiet, values_only (also document these params in the docstring)
1 parent b558d0a commit 015fdd4

3 files changed

Lines changed: 52 additions & 0 deletions

File tree

src/libtmux/options.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,14 @@ def _show_options_raw(
817817
g : bool, optional
818818
.. deprecated:: 0.50.0
819819
Use ``global_`` instead.
820+
quiet : bool, optional
821+
Suppress errors silently (``-q`` flag).
822+
823+
.. versionadded:: 0.45
824+
values_only : bool, optional
825+
Return only option values without names (``-v`` flag).
826+
827+
.. versionadded:: 0.45
820828
821829
Examples
822830
--------

src/libtmux/pane.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,13 @@ def capture_pane(
377377
alternate_screen : bool, optional
378378
Capture from the alternate screen (``-a`` flag).
379379
Default: False
380+
381+
.. versionadded:: 0.45
380382
quiet : bool, optional
381383
Suppress errors silently (``-q`` flag).
382384
Default: False
385+
386+
.. versionadded:: 0.45
383387
escape_markup : bool, optional
384388
Escape markup in the output (``-M`` flag). Requires tmux 3.6+.
385389
Default: False
@@ -481,11 +485,17 @@ def send_keys(
481485
Send keys literally, default False.
482486
reset : bool, optional
483487
Reset terminal state before sending keys (``-R`` flag).
488+
489+
.. versionadded:: 0.45
484490
copy_mode_cmd : str, optional
485491
Send a command to copy mode instead of keys (``-X`` flag).
486492
When set, *cmd* is ignored.
493+
494+
.. versionadded:: 0.45
487495
repeat : int, optional
488496
Repeat count for the key (``-N`` flag).
497+
498+
.. versionadded:: 0.45
489499
expand_formats : bool, optional
490500
Expand tmux format strings in keys (``-F`` flag).
491501
@@ -633,18 +643,32 @@ def display_message(
633643
target-client status line.
634644
format_string : str, optional
635645
Format string for output (``-F`` flag).
646+
647+
.. versionadded:: 0.45
636648
all_formats : bool, optional
637649
List all format variables (``-a`` flag).
650+
651+
.. versionadded:: 0.45
638652
verbose : bool, optional
639653
Show format variable types (``-v`` flag).
654+
655+
.. versionadded:: 0.45
640656
no_expand : bool, optional
641657
Suppress format expansion (``-I`` flag).
658+
659+
.. versionadded:: 0.45
642660
target_client : str, optional
643661
Target client (``-c`` flag).
662+
663+
.. versionadded:: 0.45
644664
delay : int, optional
645665
Display time in milliseconds (``-d`` flag).
666+
667+
.. versionadded:: 0.45
646668
notify : bool, optional
647669
Do not wait for input (``-N`` flag).
670+
671+
.. versionadded:: 0.45
648672
list_formats : bool, optional
649673
List format variables (``-l`` flag). Requires tmux 3.4+.
650674
@@ -807,19 +831,33 @@ def select(
807831
direction : ResizeAdjustmentDirection, optional
808832
Select the pane in the given direction (``-U``, ``-D``, ``-L``,
809833
``-R``).
834+
835+
.. versionadded:: 0.45
810836
last : bool, optional
811837
Select the last (previously selected) pane (``-l`` flag).
838+
839+
.. versionadded:: 0.45
812840
keep_zoom : bool, optional
813841
Keep the window zoomed if it was zoomed (``-Z`` flag).
842+
843+
.. versionadded:: 0.45
814844
mark : bool, optional
815845
Set the marked pane (``-m`` flag).
846+
847+
.. versionadded:: 0.45
816848
clear_mark : bool, optional
817849
Clear the marked pane (``-M`` flag).
850+
851+
.. versionadded:: 0.45
818852
disable_input : bool, optional
819853
Disable input to the pane (``-d`` flag).
854+
855+
.. versionadded:: 0.45
820856
enable_input : bool, optional
821857
Enable input to the pane (``-e`` flag).
822858
859+
.. versionadded:: 0.45
860+
823861
Returns
824862
-------
825863
:class:`Pane`

src/libtmux/window.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,17 @@ def last_pane(
416416
----------
417417
detach : bool, optional
418418
Do not make the pane active (``-d`` flag).
419+
420+
.. versionadded:: 0.45
419421
keep_zoom : bool, optional
420422
Keep the window zoomed if zoomed (``-Z`` flag).
423+
424+
.. versionadded:: 0.45
421425
disable_input : bool, optional
422426
Disable input to the pane (``-e`` flag).
423427
428+
.. versionadded:: 0.45
429+
424430
Returns
425431
-------
426432
:class:`Pane` or None

0 commit comments

Comments
 (0)