Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-format code by autopep8 #245

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/acom_music_box/music_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def add_evolving_condition(self, time_point, conditions):
self.evolvingConditions.append(evolving_condition)

def create_solver(
self,
path_to_config,
solver_type=musica.micmsolver.rosenbrock,
number_of_grid_cells=1):
self,
path_to_config,
solver_type=musica.micmsolver.rosenbrock,
number_of_grid_cells=1):
"""
Creates a micm solver object using the CAMP configuration files.

Expand Down Expand Up @@ -124,11 +124,11 @@ def check_config(self, boxConfigPath):
if (len(dupNames) > 0):
# inform user of the error and its remedy
errString = ("Error: Duplicate reaction names specified within {}: {}."
.format(boxConfigPath, dupNames))
.format(boxConfigPath, dupNames))
errString += " Please remove or rename the duplicates."
raise Exception(errString)

return(True)
return (True)

def solve(self, output_path=None, callback=None):
"""
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_duplicate_reactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_run(self):
assert box_model.check_config("Loaded from string.")

# Fail: duplicate reaction names
fail_reactions = reactions=[abc123, abc789]
fail_reactions = reactions = [abc123, abc789]
fail_conditions = Conditions(reaction_rates=fail_reactions)
box_model = MusicBox(initial_conditions=fail_conditions) # new instance

Expand All @@ -30,4 +30,3 @@ def test_run(self):
if __name__ == "__main__":
test = TestDuplicateReactions()
test.test_run()