Skip to content

Commit

Permalink
Fix RunSettings Typo (#201)
Browse files Browse the repository at this point in the history
Fix typo in rs.update_env

[ committed by @MattToast  ]
[ reviewed by @ben-albrecht ]
  • Loading branch information
MattToast authored May 19, 2022
1 parent a984ead commit 3c25f14
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions smartsim/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,11 @@ def update_env(self, env_vars):
"""
val_types = (str, int, float, bool)
# Coerce env_vars values to str as a convenience to user
for (env, val) in env_vars.items():
if type(val) not in val_types:
raise TypeError(f"env_vars[{env}] was of type {type(val)}, not {val_types_union}")
for env, val in env_vars.items():
if not isinstance(val, val_types):
raise TypeError(
f"env_vars[{env}] was of type {type(val)}, not {val_types}"
)
else:
self.env_vars[env] = val

Expand Down Expand Up @@ -512,7 +514,6 @@ def format_env_vars(self):
else:
formatted.append(f"{key}={val}")
return formatted


def __str__(self): # pragma: no-cover
string = f"Executable: {self.exe[0]}\n"
Expand Down

0 comments on commit 3c25f14

Please sign in to comment.