From d4683eea5e472618b716de398f4dce682e0aa980 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Sat, 16 Nov 2024 10:12:18 +0000 Subject: [PATCH] Black reformating --- premise/export.py | 13 ++++++------- tests/test_process_ei310_cutoff_increment.py | 6 +----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/premise/export.py b/premise/export.py index c1a3e1ae..aa19eb63 100644 --- a/premise/export.py +++ b/premise/export.py @@ -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) @@ -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'])]}", ] ) @@ -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 @@ -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 @@ -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: @@ -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"] @@ -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 diff --git a/tests/test_process_ei310_cutoff_increment.py b/tests/test_process_ei310_cutoff_increment.py index e9a1c5ce..4e20176d 100644 --- a/tests/test_process_ei310_cutoff_increment.py +++ b/tests/test_process_ei310_cutoff_increment.py @@ -53,11 +53,7 @@ def test_increment(): sectors = { "electricity": "electricity", "steel": "steel", - "others": [ - "cement", - "cars", - "fuels" - ] + "others": ["cement", "cars", "fuels"], } ndb.update(sectors=sectors)