Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Dec 22, 2024
1 parent f0fdc7b commit ac96f00
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions premise/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def add_variables_mapping(self):
for variables in val.get("production pathways", {}).values():
for variable in variables:
if variable not in mapping:
variable_name = variable["production volume"]["variable"]
variable_name = variable["production volume"][
"variable"
]
mapping[variable] = {"scenario variable": variable_name}
filters = variable.get("ecoinvent alias")
mask = variable.get("ecoinvent alias").get("mask")
Expand All @@ -257,14 +259,14 @@ def add_variables_mapping(self):
]

if len(mapping[variable]["dataset"]) == 0:
print(f"No dataset found for {variable} in {variable_name}")
print(
f"No dataset found for {variable} in {variable_name}"
)
print(f"Filters: {filters}")
print(f"Mask: {mask}")
continue

variables = list(
val["production pathways"].keys()
)
variables = list(val["production pathways"].keys())
variables.remove(variable)
# remove datasets which names are in list of variables
# except for the current variable
Expand Down

0 comments on commit ac96f00

Please sign in to comment.