diff --git a/premise/external.py b/premise/external.py index 6c0fd81c..d614b989 100644 --- a/premise/external.py +++ b/premise/external.py @@ -805,9 +805,11 @@ def check_existence_of_market_suppliers(self): # ) suppliers = [ - s for s in self.database + s + for s in self.database if s["name"].lower() == name.lower() - and s["reference product"].lower() == ref_prod.lower() + and s["reference product"].lower() + == ref_prod.lower() and s["location"] == possible_locations[counter] ] @@ -884,7 +886,8 @@ def fetch_potential_suppliers( # ) act = [ - a for a in self.database + a + for a in self.database if a["name"].lower() == name.lower() and a["reference product"].lower() == ref_prod.lower() and a["location"] == possible_locations[counter] diff --git a/premise/external_data_validation.py b/premise/external_data_validation.py index b645761b..a4fc49ae 100644 --- a/premise/external_data_validation.py +++ b/premise/external_data_validation.py @@ -343,7 +343,8 @@ def check_inventories( for i, v in d_datasets.items() if not v["exists in original database"] and not v.get("new dataset") - and (i[0].lower(), i[1].lower()) in [(x[0].lower(), x[1].lower()) for x in list_datasets] + and (i[0].lower(), i[1].lower()) + in [(x[0].lower(), x[1].lower()) for x in list_datasets] ] raise AssertionError( diff --git a/premise/fuels.py b/premise/fuels.py index 52bfe73c..22d4a169 100644 --- a/premise/fuels.py +++ b/premise/fuels.py @@ -611,8 +611,12 @@ def generate_hydrogen_activities(self) -> None: exc["amount"] *= scaling_factor exc["uncertainty type"] = 5 exc["loc"] = exc["amount"] - exc["minimum"] = exc["amount"] * (min_energy_use / new_energy_use) - exc["maximum"] = exc["amount"] * (max_energy_use / new_energy_use) + exc["minimum"] = exc["amount"] * ( + min_energy_use / new_energy_use + ) + exc["maximum"] = exc["amount"] * ( + max_energy_use / new_energy_use + ) else: # rescale the fuel consumption exchange