Commit c47de8be authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

update Instance.args setter

parent 2b40017b
......@@ -31,13 +31,16 @@ class Instance:
return (
self.arguments if isinstance(self.arguments, tuple) else (self.arguments,)
)
@args.setter
def args(self, new_arguments: tuple) -> None:
"""
Update the arguments of this instance with a new one
"""
if isinstance(new_arguments, tuple):
assert (
len(new_arguments) == len(self.args)
), "Must set new Instance arguments to have same size + types as old arguments"
self.arguments = new_arguments
else:
print("Please enter a valid arguments tuple")
raise ValueError("Must set new Instance args to a tuple!")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment