Skip to content

Commit 3e8ff92

Browse files
committed
docs: tidy async docstrings and exports
1 parent 70d61cd commit 3e8ff92

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

src/libtmux/pane.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
from libtmux.formats import FORMAT_SEPARATOR
2525
from libtmux.neo import Obj, fetch_obj
2626

27+
__all__ = ["Pane", "PaneDirection"]
28+
29+
2730
if t.TYPE_CHECKING:
2831
import sys
2932
import types
@@ -412,9 +415,9 @@ async def acapture_pane(
412415
413416
Notes
414417
-----
415-
This method is non-blocking and suitable for use in async applications.
416-
It's particularly powerful when capturing output from multiple panes concurrently
417-
using ``asyncio.gather()``, which can significantly improve performance
418+
This method is non-blocking and suitable for async applications. It is
419+
especially helpful when capturing output from multiple panes concurrently
420+
via ``asyncio.gather()``, which can significantly improve performance
418421
compared to sequential capture.
419422
420423
.. versionadded:: 0.48.0

src/libtmux/server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,9 @@ async def acmd(
394394
async def ahas_session(self, target_session: str, exact: bool = True) -> bool:
395395
"""Return True if session exists asynchronously.
396396
397-
This is the async version of :meth:`has_session`. It uses ``await self.acmd()``
398-
for non-blocking session existence checks, making it suitable for async applications.
397+
This is the async version of :meth:`has_session`. It uses
398+
``await self.acmd()`` for non-blocking session existence checks, making
399+
it suitable for async applications.
399400
400401
Equivalent to::
401402

src/libtmux/session.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,9 @@ async def acmd(
295295
async def arename_session(self, new_name: str) -> Session:
296296
"""Rename session asynchronously and return session object.
297297
298-
This is the async version of :meth:`rename_session`. It uses ``await self.acmd()``
299-
for non-blocking session renaming, making it suitable for async applications.
298+
This is the async version of :meth:`rename_session`. It uses
299+
``await self.acmd()`` for non-blocking session renaming, making it
300+
suitable for async applications.
300301
301302
Equivalent to::
302303
@@ -372,7 +373,9 @@ async def arename_session(self, new_name: str) -> Session:
372373
>>> async def test_chaining():
373374
... # arename_session returns self, allowing chaining
374375
... test_session = await server.anew_session("arename_chain_old")
375-
... renamed_session = await test_session.arename_session("arename_chain_new")
376+
... renamed_session = await test_session.arename_session(
377+
... "arename_chain_new"
378+
... )
376379
... window = await renamed_session.anew_window(window_name="main")
377380
... result = (renamed_session.session_name, window.window_name)
378381
... await server.acmd("kill-session", target="arename_chain_new")

0 commit comments

Comments
 (0)