Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ways committed Nov 29, 2024
1 parent 8aabede commit c2331d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions sedr/preflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def main():
for test_func in util.test_functions["landing"]:
status, msg = test_func(jsondata=landing_json)
if not status:
util.logger.error("Test %s failed with message: %s", test_func.__name__, msg)
util.logger.error(
"Test %s failed with message: %s", test_func.__name__, msg
)
else:
util.logger.info("Test %s passed. (%s)", test_func.__name__, msg)

Expand All @@ -69,7 +71,9 @@ def main():
for test_func in util.test_functions["conformance"]:
status, msg = test_func(conformance_json)
if not status:
util.logger.error("Test %s failed with message: %s", test_func.__name__, msg)
util.logger.error(
"Test %s failed with message: %s", test_func.__name__, msg
)
else:
util.logger.debug("Test %s passed. (%s)", test_func.__name__, msg)

Expand Down
4 changes: 2 additions & 2 deletions sedr/rodeoprofile10.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ def requirement7_3(jsondata: dict) -> tuple[bool, str]:
break
else:
return (
False if util.args.strict else True,
not util.args.strict,
f"Collection id SHOULD be from the following list of values: "
f"{', '.join(approved_data_types)}. A postfix can be added. "
f"Found: <{jsondata['id']}>. See <{spec_url}> for more info.",
)
except (json.JSONDecodeError, KeyError) as err:
return (
False if util.args.strict else True,
not util.args.strict,
f"Collection must have an id. None found in collection <{jsondata}>."
f"Error {err}.",
)
Expand Down
8 changes: 6 additions & 2 deletions sedr/schemat.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ def test_edr_collections(case):
for test_func in util.test_functions["collection"]:
status, msg = test_func(jsondata=collection_json)
if not status:
util.logger.error("Test %s failed with message: %s", test_func.__name__, msg)
raise AssertionError(f"Test {test_func.__name__} failed with message: {msg}")
util.logger.error(
"Test %s failed with message: %s", test_func.__name__, msg
)
raise AssertionError(
f"Test {test_func.__name__} failed with message: {msg}"
)
util.logger.info("Test %s passed. (%s)", test_func.__name__, msg)

# Validation of spatial_bbox done above
Expand Down

0 comments on commit c2331d0

Please sign in to comment.