Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Oct 3, 2024
1 parent 3999231 commit 3c88e8e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
9 changes: 6 additions & 3 deletions premise/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
]

Expand Down Expand Up @@ -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]
Expand Down
3 changes: 2 additions & 1 deletion premise/external_data_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 6 additions & 2 deletions premise/fuels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c88e8e

Please sign in to comment.