mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-23 20:10:29 +03:00
scripts/check-schemas-load: black-formatted, and be verbose
This commit is contained in:
parent
7523d6dc17
commit
c6e47813bb
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user