diff --git a/smartsim/entity/application.py b/smartsim/entity/application.py index 09cddd3a8..12764845d 100644 --- a/smartsim/entity/application.py +++ b/smartsim/entity/application.py @@ -271,7 +271,7 @@ def _build_exe_args(exe_args: t.Union[str, t.Sequence[str], None]) -> t.List[str if isinstance(exe_args, str): return exe_args.split() - return copy.deepcopy(exe_args) + return list(exe_args) def print_attached_files(self) -> None: """Print a table of the attached files on std out""" diff --git a/smartsim/entity/ensemble.py b/smartsim/entity/ensemble.py index f1f305193..f228c4a8a 100644 --- a/smartsim/entity/ensemble.py +++ b/smartsim/entity/ensemble.py @@ -51,7 +51,7 @@ def __init__( self, name: str, exe: str | os.PathLike[str], - exe_args: t.MutableSequence[str] | None = None, + exe_args: t.Sequence[str] | None = None, exe_arg_parameters: t.Mapping[str, t.Sequence[t.Sequence[str]]] | None = None, files: EntityFiles | None = None, file_parameters: t.Mapping[str, t.Sequence[str]] | None = None, @@ -77,7 +77,7 @@ def __init__( """The name of the ensemble""" self._exe = os.fspath(exe) """The executable to run""" - self._exe_args = copy.deepcopy(exe_args) if exe_args else [] + self.exe_args = list(exe_args) if exe_args else [] """The executable arguments""" self._exe_arg_parameters = ( copy.deepcopy(exe_arg_parameters) if exe_arg_parameters else {} @@ -113,7 +113,7 @@ def exe(self, value: str | os.PathLike[str]) -> None: self._exe = os.fspath(value) @property - def exe_args(self) -> t.MutableSequence[str]: + def exe_args(self) -> t.List[str]: """Return a list of attached executable arguments. :returns: application executable arguments