Skip to content

Commit

Permalink
Switched to more implict if statement for lists
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobcook1995 committed Nov 16, 2022
1 parent f8c6f57 commit 1c83dd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virtual_rainforest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def select_models(model_list: list[str]) -> list[Type[BaseModel]]:

# Make list of missing models, and return an error if necessary
miss_model = [model for model in model_list_ if model not in MODEL_REGISTRY.keys()]
if len(miss_model):
if miss_model:
log_and_raise(
f"The following models cannot be configured as they are not found in the "
f"registry: {miss_model}",
Expand Down Expand Up @@ -70,7 +70,7 @@ def configure_models(
failed_models.append(model.name)

# If any models fail to configure inform the user about it
if len(failed_models):
if failed_models:
log_and_raise(
f"Could not configure all the desired models, ending the simulation. The "
f"following models failed: {failed_models}.",
Expand Down

0 comments on commit 1c83dd3

Please sign in to comment.