diff --git a/src/acom_music_box/evolving_conditions.py b/src/acom_music_box/evolving_conditions.py index 9d689ded..e763fd1b 100644 --- a/src/acom_music_box/evolving_conditions.py +++ b/src/acom_music_box/evolving_conditions.py @@ -145,7 +145,7 @@ def add_condition(self, time_point, conditions): self.conditions.append(conditions) @classmethod - def read_conditions_from_file(self, file_path): + def read_conditions_from_file(cls, file_path): """ Read conditions from a file and update the evolving conditions. @@ -191,7 +191,7 @@ def read_conditions_from_file(self, file_path): reaction_rates)) - return self(times=times, conditions=conditions) + return cls(times=times, conditions=conditions) # allows len overload for this class