Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pathways' into pathways
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi authored and romainsacchi committed Aug 6, 2024
2 parents c8c02dd + 2c787f2 commit 88196e3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions premise/inventory_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ def check_uncertainty_data(data, filename):
if exc["uncertainty type"] not in {0, 1}:
missing_parameters = [
f
for f in MANDATORY_UNCERTAINTY_FIELDS[
exc["uncertainty type"]
]
for f in MANDATORY_UNCERTAINTY_FIELDS[exc["uncertainty type"]]
if exc.get(f) is None
]
if missing_parameters:
Expand All @@ -275,7 +273,7 @@ def check_uncertainty_data(data, filename):
dataset["name"][:30],
exc["name"][:30],
exc["uncertainty type"],
missing_parameters
missing_parameters,
]
)

Expand All @@ -292,7 +290,11 @@ def check_uncertainty_data(data, filename):
]
)

if not exc.get("minimum", 0) <= exc.get("loc", 0) <= exc.get("maximum", 0):
if (
not exc.get("minimum", 0)
<= exc.get("loc", 0)
<= exc.get("maximum", 0)
):
rows.append(
[
dataset["name"][:30],
Expand Down

0 comments on commit 88196e3

Please sign in to comment.