Skip to content

Commit

Permalink
changed typing
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaputko committed Sep 4, 2024
1 parent b618b9a commit f913ce0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion smartsim/entity/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
6 changes: 3 additions & 3 deletions smartsim/entity/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {}
Expand Down Expand Up @@ -113,7 +113,7 @@ def exe(self, value: str | os.PathLike[str]) -> None:
self._exe = os.fspath(value)

Check warning on line 113 in smartsim/entity/ensemble.py

View check run for this annotation

Codecov / codecov/patch

smartsim/entity/ensemble.py#L113

Added line #L113 was not covered by tests

@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
Expand Down

0 comments on commit f913ce0

Please sign in to comment.