Skip to content

Commit 49fbcdd

Browse files
committed
Fix typing of paths in add_process
1 parent edb40a7 commit 49fbcdd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

simvue/executor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import multiprocessing
1717
import os
1818
import subprocess
19+
import pathlib
1920
import time
2021
import typing
2122

@@ -100,8 +101,8 @@ def add_process(
100101
identifier: str,
101102
*args,
102103
executable: typing.Optional[str] = None,
103-
script: typing.Optional[str] = None,
104-
input_file: typing.Optional[str] = None,
104+
script: typing.Optional[pathlib.Path] = None,
105+
input_file: typing.Optional[pathlib.Path] = None,
105106
env: typing.Optional[typing.Dict[str, str]] = None,
106107
completion_callback: typing.Optional[
107108
typing.Callable[[int, str, str], None]

simvue/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def add_process(
609609
self,
610610
identifier: str,
611611
*cmd_args,
612-
executable: typing.Optional[str] = None,
612+
executable: typing.Optional[typing.Union[str]] = None,
613613
script: typing.Optional[pydantic.FilePath] = None,
614614
input_file: typing.Optional[pydantic.FilePath] = None,
615615
completion_callback: typing.Optional[
@@ -716,8 +716,8 @@ def callback_function(status_code: int, std_out: str, std_err: str) -> None:
716716
identifier,
717717
*_pos_args,
718718
executable=executable,
719-
script=f"{script}",
720-
input_file=f"{input_file}",
719+
script=script,
720+
input_file=input_file,
721721
completion_callback=completion_callback,
722722
completion_trigger=completion_trigger,
723723
env=env,

0 commit comments

Comments
 (0)