Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Nov 16, 2024
1 parent bb3db24 commit d4683ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 6 additions & 7 deletions premise/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,6 @@ def get_category_of_exchange(self):

return dict_categories


def export_db_to_simapro(self, olca_compartments=False):
if not os.path.exists(self.filepath):
os.makedirs(self.filepath)
Expand Down Expand Up @@ -1581,7 +1580,7 @@ def export_db_to_simapro(self, olca_compartments=False):
1.0,
"not defined",
sub_category,
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'],e['product'],e['location'])]}"
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'],e['product'],e['location'])]}",
]
)

Expand All @@ -1594,7 +1593,7 @@ def export_db_to_simapro(self, olca_compartments=False):
"100%",
"not defined",
sub_category,
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'], e['product'], e['location'])]}"
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'], e['product'], e['location'])]}",
]
)
e["used"] = True
Expand All @@ -1619,7 +1618,7 @@ def export_db_to_simapro(self, olca_compartments=False):
0,
0,
0,
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'], e['product'], e['location'])]}"
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'], e['product'], e['location'])]}",
]
)
e["used"] = True
Expand Down Expand Up @@ -1668,7 +1667,7 @@ def export_db_to_simapro(self, olca_compartments=False):

if e["name"].lower() == "water":
unit = "kilogram"
#e["unit"] = "kilogram"
# e["unit"] = "kilogram"
# going from cubic meters to kilograms
e["amount"] *= 1000
else:
Expand Down Expand Up @@ -1708,7 +1707,7 @@ def export_db_to_simapro(self, olca_compartments=False):

if e["name"].lower() == "water":
unit = "kilogram"
#e["unit"] = "kilogram"
# e["unit"] = "kilogram"
e["amount"] /= 1000
else:
unit = e["unit"]
Expand Down Expand Up @@ -1785,7 +1784,7 @@ def export_db_to_simapro(self, olca_compartments=False):
0,
0,
0,
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'], e['product'], e['location'])]}"
f"{replace_unsupported_characters(e.get('comment'))} | ID = {uuids[(e['name'], e['product'], e['location'])]}",
]
)
e["used"] = True
Expand Down
6 changes: 1 addition & 5 deletions tests/test_process_ei310_cutoff_increment.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ def test_increment():
sectors = {
"electricity": "electricity",
"steel": "steel",
"others": [
"cement",
"cars",
"fuels"
]
"others": ["cement", "cars", "fuels"],
}

ndb.update(sectors=sectors)
Expand Down

0 comments on commit d4683ee

Please sign in to comment.