From 2b277375793e79a489926becf153fe430dd463a6 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Sun, 8 Oct 2023 14:32:58 +0000 Subject: [PATCH] Black reformating --- premise/external.py | 8 +++++--- premise/external_data_validation.py | 7 ++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/premise/external.py b/premise/external.py index 8cf0e6e9..7db91b58 100644 --- a/premise/external.py +++ b/premise/external.py @@ -1065,9 +1065,11 @@ def create_custom_markets(self) -> None: # if there's more than one region, we create a World region create_world_region = True - if "World" in regions or "World" in market_vars.get( - "except regions", [] - ) or len(regions) == 1: + if ( + "World" in regions + or "World" in market_vars.get("except regions", []) + or len(regions) == 1 + ): create_world_region = False if create_world_region: diff --git a/premise/external_data_validation.py b/premise/external_data_validation.py index 6860685e..e4a117ea 100644 --- a/premise/external_data_validation.py +++ b/premise/external_data_validation.py @@ -41,7 +41,12 @@ def check_inventories( ), "new dataset": val["ecoinvent alias"].get("new dataset", False), "regionalize": val["ecoinvent alias"].get("regionalize", False), - "except regions": val.get("except regions", ["World",]), + "except regions": val.get( + "except regions", + [ + "World", + ], + ), "efficiency": val.get("efficiency", []), "replaces": val.get("replaces", []), "replaces in": val.get("replaces in", []),