@@ -82,11 +82,11 @@ def __init__(self, cwd: str | Path, args: list[str]) -> None:
8282
8383 def debug (self , debug_callback : Callable [[Any ], Any ]) -> None :
8484 """
85- Register a callback function to receive messages
86- describing current service/worker activity.
85+ Register a callback function to receive messages describing current
86+ service/worker activity.
8787
88- :param debug_callback :
89- A function that accepts a single string argument.
88+ Args :
89+ debug_callback: A function that accepts a single string argument.
9090 """
9191 self ._debug_callback = debug_callback
9292
@@ -130,31 +130,35 @@ def task(
130130 ) -> "Task" :
131131 """
132132 Create a new task, passing the given script to the worker for execution.
133- :param script:
134- The script for the worker to execute in its environment.
135- :param inputs:
136- Optional list of key/value pairs to feed into the script as inputs.
137- :param queue:
138- Optional queue target. Pass "main" to queue to worker's main thread.
133+
134+ Args:
135+ script: The script for the worker to execute in its environment.
136+ inputs: Optional list of key/value pairs to feed into the script as inputs.
137+ queue: Optional queue target. Pass "main" to queue to worker's main thread.
139138 """
140139 self .start ()
141140 return Task (self , script , inputs , queue )
142141
143142 def syntax (self , syntax : str | ScriptSyntax ) -> Service :
144143 """
145- Declares the script syntax of this service.
144+ Declare the script syntax of this service.
146145
147- This value determines which {@link ScriptSyntax} implementation is used
146+ This value determines which ScriptSyntax implementation is used
148147 for generating language-specific scripts.
149148
150149 This method is called directly by Environment.python() and
151150 Environment.groovy() when creating services of those types.
152151 It can also be called manually to support custom languages with
153152 registered ScriptSyntax plugins.
154153
155- :param syntax: The type identifier (e.g., "python", "groovy").
156- :return: This service object, for chaining method calls.
157- :raises: ValueError If no syntax plugin is found for the given type.
154+ Args:
155+ syntax: The type identifier (e.g., "python", "groovy").
156+
157+ Returns:
158+ This service object, for chaining method calls.
159+
160+ Raises:
161+ ValueError: If no syntax plugin is found for the given type.
158162 """
159163 self ._syntax = (
160164 syntax if isinstance (syntax , ScriptSyntax ) else syntax_from_name (syntax )
@@ -163,7 +167,7 @@ def syntax(self, syntax: str | ScriptSyntax) -> Service:
163167
164168 def get_var (self , name : str ) -> Any :
165169 """
166- Retrieves a variable's value from the worker process's global scope.
170+ Retrieve a variable's value from the worker process's global scope.
167171
168172 The variable must have been previously exported using task.export()
169173 to be accessible across tasks.
@@ -186,7 +190,7 @@ def get_var(self, name: str) -> Any:
186190
187191 def put_var (self , name : str , value : Any ) -> None :
188192 """
189- Sets a variable in the worker process's global scope and exports it
193+ Set a variable in the worker process's global scope and export it
190194 for future use across tasks.
191195
192196 Args:
@@ -205,8 +209,8 @@ def put_var(self, name: str, value: Any) -> None:
205209
206210 def call (self , function : str , * args : Any ) -> Any :
207211 """
208- Calls a function in the worker process with the given arguments and
209- returns the result.
212+ Call a function in the worker process with the given arguments and
213+ return the result.
210214
211215 The function must be accessible in the worker's global scope (either
212216 built-in or previously defined/imported).
@@ -236,7 +240,7 @@ def call(self, function: str, *args: Any) -> Any:
236240
237241 def proxy (self , var : str , api : type , queue : str | None = None ) -> Any :
238242 """
239- Creates a proxy object providing strongly typed access to a remote
243+ Create a proxy object providing strongly typed access to a remote
240244 object in this service's worker process.
241245
242246 Method calls on the proxy are transparently forwarded to the remote
@@ -518,7 +522,7 @@ def wait_for(self) -> "Task":
518522
519523 def result (self ) -> Any :
520524 """
521- Returns the result of this task.
525+ Return the result of this task.
522526
523527 This is a convenience method that returns outputs["result"].
524528 For tasks that return a single value (e.g., from an expression),
0 commit comments