@@ -15,6 +15,7 @@ class QueuedExecution:
1515 """Represents a queued action execution that will resolve to an exec_id when the batch executes."""
1616
1717 def __init__ (self ) -> None :
18+ """Initialize the queued execution."""
1819 self ._future : asyncio .Future [str ] = asyncio .Future ()
1920
2021 def set_result (self , exec_id : str ) -> None :
@@ -33,8 +34,7 @@ def __await__(self):
3334
3435
3536class ActionQueue :
36- """
37- Batches multiple action executions into single API calls.
37+ """Batches multiple action executions into single API calls.
3838
3939 When actions are added, they are held for a configurable delay period.
4040 If more actions arrive during this window, they are batched together.
@@ -53,8 +53,7 @@ def __init__(
5353 delay : float = 0.5 ,
5454 max_actions : int = 20 ,
5555 ) -> None :
56- """
57- Initialize the action queue.
56+ """Initialize the action queue.
5857
5958 :param executor: Async function to execute batched actions
6059 :param delay: Seconds to wait before auto-flushing (default 0.5)
@@ -78,8 +77,7 @@ async def add(
7877 mode : CommandMode | None = None ,
7978 label : str | None = None ,
8079 ) -> QueuedExecution :
81- """
82- Add actions to the queue.
80+ """Add actions to the queue.
8381
8482 :param actions: Actions to queue
8583 :param mode: Command mode (will flush if different from pending mode)
@@ -176,8 +174,7 @@ async def _flush_now(self) -> None:
176174 raise
177175
178176 async def flush (self ) -> list [str ]:
179- """
180- Force flush all pending actions immediately.
177+ """Force flush all pending actions immediately.
181178
182179 :return: List of exec_ids from flushed batches
183180 """
0 commit comments