From c6e47813bb86d71d423053c46788b56306edc36d Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 12 Mar 2022 15:05:10 +0000 Subject: [PATCH] scripts/check-schemas-load: black-formatted, and be verbose --- scripts/check-schemas-load.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/check-schemas-load.py b/scripts/check-schemas-load.py index 2d95559..fe17bc2 100644 --- a/scripts/check-schemas-load.py +++ b/scripts/check-schemas-load.py @@ -10,16 +10,16 @@ script_path = pathlib.Path(sys.argv[0]) root_dir = script_path.parent.parent # Take every file in the schemas directory -schemas_dir = root_dir / 'schemas' +schemas_dir = root_dir / "schemas" failures = 0 -for schema_file in schemas_dir.glob('*-v*.*.json'): - # print(f'Schema: {schema_file}') - with open(schema_file, 'r') as sf: +for schema_file in schemas_dir.glob("*-v*.*.json"): + print(f"Schema: {schema_file}") + with open(schema_file, "r") as sf: try: json = simplejson.load(sf) except simplejson.JSONDecodeError as e: - print(f'Failed to load {schema_file}:\n{e!r}') + print(f"Failed to load {schema_file}:\n{e!r}") failures += 1 if failures > 0: