Skip to content

Commit 8c207de

Browse files
committed
Black reformating
1 parent 8f7923e commit 8c207de

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

premise/activity_maps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def generate_sets_from_filters(self, filtr: dict, database=None) -> dict:
308308

309309
# check if all keys have values
310310
# if not, print warning
311-
#for key, val in mapping.items():
311+
# for key, val in mapping.items():
312312
# if not val:
313313
# print(f"Warning: No activities found for {key} -- revise mapping.")
314314

premise/export.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,9 @@ def prepare_db_for_export(
977977
return validator.database
978978

979979

980-
def _prepare_database(scenario, db_name, original_database, keep_uncertainty_data, biosphere_name):
980+
def _prepare_database(
981+
scenario, db_name, original_database, keep_uncertainty_data, biosphere_name
982+
):
981983

982984
scenario["database"] = prepare_db_for_export(
983985
scenario,

premise/fuels.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,7 @@ def generate_regional_fuel_market(
22812281
"petroleum coke",
22822282
"petroleum gas",
22832283
"wax",
2284-
#"low pressure",
2284+
# "low pressure",
22852285
"pressure, vehicle grade",
22862286
"burned",
22872287
"market",
@@ -2483,7 +2483,11 @@ def generate_fuel_markets(self):
24832483
]
24842484

24852485
d_act = self.fetch_proxies(
2486-
name=activity["name"] if isinstance(activity["name"], str) else activity["name"][self.version],
2486+
name=(
2487+
activity["name"]
2488+
if isinstance(activity["name"], str)
2489+
else activity["name"][self.version]
2490+
),
24872491
ref_prod=activity["reference product"],
24882492
production_variable=prod_vars,
24892493
exact_name_match=False,

premise/inventory_imports.py

-2
Original file line numberDiff line numberDiff line change
@@ -681,14 +681,12 @@ def add_biosphere_links(self) -> None:
681681
y["delete"] = True
682682
y["name"] = new_key[0]
683683

684-
685684
y["input"] = (
686685
"biosphere3",
687686
self.biosphere_dict.get(key),
688687
)
689688
x["exchanges"] = [y for y in x["exchanges"] if "delete" not in y]
690689

691-
692690
def lower_case_technosphere_exchanges(self) -> None:
693691
blakclist = [
694692
"NOx",

premise/new_database.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ def _export_to_simapro(obj):
458458
def _export_to_olca(obj):
459459
obj.export_db_to_simapro(olca_compartments=True)
460460

461+
461462
def check_presence_biosphere_database() -> str:
462463
"""
463464
Check that the biosphere database is present in the current project.
@@ -466,15 +467,15 @@ def check_presence_biosphere_database() -> str:
466467
biosphere_name = "biosphere3"
467468
if "biosphere3" not in bw2data.databases:
468469
print("premise requires the name of your biosphere database.")
469-
print("Please enter the name of your biosphere database as it appears in your project.")
470+
print(
471+
"Please enter the name of your biosphere database as it appears in your project."
472+
)
470473
print(bw2data.databases)
471474
biosphere_name = input("Name of the biosphere database: ")
472475

473476
return biosphere_name
474477

475478

476-
477-
478479
class NewDatabase:
479480
"""
480481
Class that represents a new wurst inventory database, modified according to IAM data.

0 commit comments

Comments
 (0)