Skip to content

Commit f17bb4f

Browse files
committed
docs: Add bidirectional linking from sync to async methods
Complete bidirectional documentation linking by adding "See Also" references from sync methods to their async counterparts. This makes async alternatives immediately discoverable when users are reading sync method documentation. Changes: - Server.has_session() → links to ahas_session() - Server.new_session() → links to anew_session() - Session.new_window() → links to anew_window() - Session.rename_session() → links to arename_session() - Window.kill() → links to akill() Now both directions work: - Async methods have always linked to sync versions - Sync methods now link to async versions This completes the documentation enhancement, providing perfect discoverability in both directions for users working with either sync or async APIs.
1 parent 432d914 commit f17bb4f

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/libtmux/server.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@ def has_session(self, target_session: str, exact: bool = True) -> bool:
805805
Returns
806806
-------
807807
bool
808+
809+
See Also
810+
--------
811+
:meth:`ahas_session` : Async version of this method
808812
"""
809813
session_check_name(target_session)
810814

@@ -963,6 +967,10 @@ def new_session(
963967
------
964968
:exc:`exc.BadSessionName`
965969
970+
See Also
971+
--------
972+
:meth:`anew_session` : Async version of this method
973+
966974
Examples
967975
--------
968976
Sessions can be created without a session name (0.14.2+):

src/libtmux/session.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,10 @@ def rename_session(self, new_name: str) -> Session:
964964
Raises
965965
------
966966
:exc:`exc.BadSessionName`
967+
968+
See Also
969+
--------
970+
:meth:`arename_session` : Async version of this method
967971
"""
968972
session_check_name(new_name)
969973

@@ -1033,6 +1037,7 @@ def new_window(
10331037
10341038
See Also
10351039
--------
1040+
:meth:`anew_window` : Async version of this method
10361041
:meth:`Window.new_window()`
10371042
10381043
Examples

src/libtmux/window.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@ def kill(
757757
758758
``$ tmux kill-window``.
759759
760+
See Also
761+
--------
762+
:meth:`akill` : Async version of this method
763+
760764
Examples
761765
--------
762766
Kill a window:

0 commit comments

Comments
 (0)