Skip to content

Commit

Permalink
Merge pull request #245 from NCAR/main-autopep8
Browse files Browse the repository at this point in the history
Auto-format code by autopep8
  • Loading branch information
K20shores committed Sep 24, 2024
2 parents 6286303 + 3ab83cc commit 3c6a526
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
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()

0 comments on commit 3c6a526

Please sign in to comment.