Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Mar 29, 2023
1 parent 79b8c7f commit 377d1be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion premise/data_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def get_gains_EU_data() -> xr.DataArray:
"value": float,
"year": int,
"substance": str,
"Activity_long": str
"Activity_long": str,
},
encoding="utf-8",
)
Expand Down
1 change: 0 additions & 1 deletion premise/direct_air_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def generate_dac_activities(self) -> None:

# loop through heat sources
for heat_type, activities in heat_map_ds.items():

# with consequential modeling, waste heat is not available
if (
self.system_model == "consequential"
Expand Down
8 changes: 6 additions & 2 deletions premise/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ def check_amount_format(database: list) -> list:

for k, v in dataset.items():
if not type(v) in [str, float, int, tuple, list, dict, bool]:
list_exchanges_wrong_format.append([dataset["name"], dataset["location"], k, v, type(v)])
list_exchanges_wrong_format.append(
[dataset["name"], dataset["location"], k, v, type(v)]
)

if isinstance(v, dict):
for i, j in v.items():
Expand All @@ -212,7 +214,9 @@ def check_amount_format(database: list) -> list:
if isinstance(v, np.float64):
e[k] = float(e[k])
else:
list_exchanges_wrong_format.append([dataset["name"], dataset["location"], k, v, type(v)])
list_exchanges_wrong_format.append(
[dataset["name"], dataset["location"], k, v, type(v)]
)

if list_exchanges_wrong_format:
print("One or multiple exchanges have a wrong format.")
Expand Down

0 comments on commit 377d1be

Please sign in to comment.