@@ -49,7 +49,7 @@ def env_vars(self) -> dict[str, str]: # noqa: PLR6301
4949 """
5050 return {}
5151
52- def run (self , command : list [str ], * args : Any , ** kwargs : Any ) -> CompletedProcess :
52+ def run (self , command : list [str ], ** kwargs : Any ) -> int :
5353 """
5454 Equivalent to [`SubprocessRunner.run`][dda.utils.process.SubprocessRunner.run] with the `command` formatted
5555 by the tool's [`format_command`][dda.tools.base.Tool.format_command] method and the environment variables set
@@ -59,14 +59,13 @@ def run(self, command: list[str], *args: Any, **kwargs: Any) -> CompletedProcess
5959 command: The command to execute.
6060
6161 Other parameters:
62- *args: Additional arguments to pass to [`SubprocessRunner.run`][dda.utils.process.SubprocessRunner.run].
6362 **kwargs: Additional keyword arguments to pass to
6463 [`SubprocessRunner.run`][dda.utils.process.SubprocessRunner.run].
6564 """
6665 self .__populate_env_vars (kwargs )
67- return self .app .subprocess .run (self .format_command (command ), * args , * *kwargs )
66+ return self .app .subprocess .run (self .format_command (command ), ** kwargs )
6867
69- def capture (self , command : list [str ], * args : Any , * *kwargs : Any ) -> str :
68+ def capture (self , command : list [str ], ** kwargs : Any ) -> str :
7069 """
7170 Equivalent to [`SubprocessRunner.capture`][dda.utils.process.SubprocessRunner.capture] with the `command`
7271 formatted by the tool's [`format_command`][dda.tools.base.Tool.format_command] method and the environment
@@ -76,15 +75,13 @@ def capture(self, command: list[str], *args: Any, **kwargs: Any) -> str:
7675 command: The command to execute.
7776
7877 Other parameters:
79- *args: Additional arguments to pass to
80- [`SubprocessRunner.capture`][dda.utils.process.SubprocessRunner.capture].
8178 **kwargs: Additional keyword arguments to pass to
8279 [`SubprocessRunner.capture`][dda.utils.process.SubprocessRunner.capture].
8380 """
8481 self .__populate_env_vars (kwargs )
85- return self .app .subprocess .capture (self .format_command (command ), * args , * *kwargs )
82+ return self .app .subprocess .capture (self .format_command (command ), ** kwargs )
8683
87- def wait (self , command : list [str ], * args : Any , * *kwargs : Any ) -> None :
84+ def wait (self , command : list [str ], ** kwargs : Any ) -> None :
8885 """
8986 Equivalent to [`SubprocessRunner.wait`][dda.utils.process.SubprocessRunner.wait] with the `command` formatted
9087 by the tool's [`format_command`][dda.tools.base.Tool.format_command] method and the environment variables set
@@ -94,14 +91,13 @@ def wait(self, command: list[str], *args: Any, **kwargs: Any) -> None:
9491 command: The command to execute.
9592
9693 Other parameters:
97- *args: Additional arguments to pass to [`SubprocessRunner.wait`][dda.utils.process.SubprocessRunner.wait].
9894 **kwargs: Additional keyword arguments to pass to
9995 [`SubprocessRunner.wait`][dda.utils.process.SubprocessRunner.wait].
10096 """
10197 self .__populate_env_vars (kwargs )
102- self .app .subprocess .wait (self .format_command (command ), * args , * *kwargs )
98+ self .app .subprocess .wait (self .format_command (command ), ** kwargs )
10399
104- def exit_with (self , command : list [str ], * args : Any , * *kwargs : Any ) -> NoReturn :
100+ def exit_with (self , command : list [str ], ** kwargs : Any ) -> NoReturn :
105101 """
106102 Equivalent to [`SubprocessRunner.exit_with`][dda.utils.process.SubprocessRunner.exit_with]
107103 with the `command` formatted by the tool's [`format_command`][dda.tools.base.Tool.format_command] method and
@@ -111,13 +107,27 @@ def exit_with(self, command: list[str], *args: Any, **kwargs: Any) -> NoReturn:
111107 command: The command to execute.
112108
113109 Other parameters:
114- *args: Additional arguments to pass to
115- [`SubprocessRunner.exit_with`][dda.utils.process.SubprocessRunner.exit_with].
116110 **kwargs: Additional keyword arguments to pass to
117111 [`SubprocessRunner.exit_with`][dda.utils.process.SubprocessRunner.exit_with].
118112 """
119113 self .__populate_env_vars (kwargs )
120- self .app .subprocess .exit_with (self .format_command (command ), * args , ** kwargs )
114+ self .app .subprocess .exit_with (self .format_command (command ), ** kwargs )
115+
116+ def attach (self , command : list [str ], ** kwargs : Any ) -> CompletedProcess :
117+ """
118+ Equivalent to [`SubprocessRunner.attach`][dda.utils.process.SubprocessRunner.attach] with the `command` formatted
119+ by the tool's [`format_command`][dda.tools.base.Tool.format_command] method and the environment variables set
120+ by the tool's [`env_vars`][dda.tools.base.Tool.env_vars] method (if any).
121+
122+ Parameters:
123+ command: The command to execute.
124+
125+ Other parameters:
126+ **kwargs: Additional keyword arguments to pass to
127+ [`SubprocessRunner.attach`][dda.utils.process.SubprocessRunner.attach].
128+ """
129+ self .__populate_env_vars (kwargs )
130+ return self .app .subprocess .attach (self .format_command (command ), ** kwargs )
121131
122132 def __populate_env_vars (self , kwargs : dict [str , Any ]) -> None :
123133 env_vars = self .env_vars ()
0 commit comments