From df9b7eb652749a26ecd21231e14caedc615bde8b Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Sat, 21 Dec 2024 17:43:54 +0000 Subject: [PATCH] Black reformating --- premise/external.py | 5 +++-- premise/pathways.py | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/premise/external.py b/premise/external.py index 8d08da92..fdf92b91 100644 --- a/premise/external.py +++ b/premise/external.py @@ -435,11 +435,12 @@ def __init__( external_scenario_regions = {} for datapackage_number, datapackage in enumerate(self.datapackages): - external_scenario_regions[datapackage_number] = self.external_scenarios_data[datapackage_number]["regions"] + external_scenario_regions[datapackage_number] = ( + self.external_scenarios_data[datapackage_number]["regions"] + ) self.configurations = configurations or [] - for d, data in self.external_scenarios_data.items(): ds_names = get_recursively(self.configurations[d], "name") self.regionalize_inventories(ds_names, external_scenario_regions[d], data) diff --git a/premise/pathways.py b/premise/pathways.py index 7d25cb66..c6d48d6a 100644 --- a/premise/pathways.py +++ b/premise/pathways.py @@ -303,14 +303,14 @@ def add_scenario_data(self): data = xr.concat( [ data, - external["production volume"].interp( - year=scenario["year"] - ), + external["production volume"].interp(year=scenario["year"]), ], dim="variables", ) extra_units.update(external["production volume"].attrs["unit"]) - scenario_name += f" - {scenario['external scenarios'][ext]['scenario']}" + scenario_name += ( + f" - {scenario['external scenarios'][ext]['scenario']}" + ) # add a scenario dimension data = data.expand_dims("scenario")