diff --git a/sedr/preflight.py b/sedr/preflight.py index 6a15265..4fa90cb 100644 --- a/sedr/preflight.py +++ b/sedr/preflight.py @@ -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) @@ -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) diff --git a/sedr/rodeoprofile10.py b/sedr/rodeoprofile10.py index 3a0ec47..067351b 100644 --- a/sedr/rodeoprofile10.py +++ b/sedr/rodeoprofile10.py @@ -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}.", ) diff --git a/sedr/schemat.py b/sedr/schemat.py index 764ffa8..5459662 100644 --- a/sedr/schemat.py +++ b/sedr/schemat.py @@ -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