From a53d550949c1905ca2e9dec0baf59fe8ccee6945 Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Thu, 24 Oct 2024 12:31:11 +1300 Subject: [PATCH] manage.py: Update pre-commit to reflect changes in json_dump/json_load --- manage.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/manage.py b/manage.py index 17e85278a..9e1a9c11b 100755 --- a/manage.py +++ b/manage.py @@ -568,7 +568,7 @@ def pre_commit(): - versioned-release-validation-schema.json - strict-release-schema.json - strict-release-package.json - - strict-record-package.jso + - strict-record-package.json - strict-dereferenced-release-schema.json - strict-versioned-release-validation-schema.json """ @@ -584,6 +584,7 @@ def pre_commit(): } release_schema = json_load('release-schema.json') + strict_release_schema = get_strict_schema(deepcopy(release_schema)) jsonref_release_schema = json_load('release-schema.json', jsonref, merge_props=True) counts = defaultdict(list) @@ -640,15 +641,15 @@ def pre_commit(): # Strict schemas. directory = Path('strict') - strict_release_schema = get_strict_schema(deepcopy(release_schema)) - json_dump(directory / 'release-schema', strict_release_schema) + json_dump(directory / 'release-schema.json', strict_release_schema) - strict_dereferenced_release_schema = json_load(directory / 'release-schema', jsonref, merge_props=True) - json_dump(directory / 'dereferenced-release-schema', strict_dereferenced_release_schema) - json_dump(directory / 'versioned-release-validation-schema', get_versioned_release_schema(strict_release_schema)) + strict_dereferenced_release_schema = json_load(directory / 'release-schema.json', jsonref, merge_props=True) + json_dump(directory / 'dereferenced-release-schema.json', strict_dereferenced_release_schema) + json_dump(directory / 'versioned-release-validation-schema.json', + get_versioned_release_schema(strict_release_schema)) - json_dump(directory / 'release-package-schema', get_strict_schema(json_load('release-package-schema'))) - json_dump(directory / 'record-package-schema', get_strict_schema(json_load('record-package-schema'))) + json_dump(directory / 'release-package-schema.json', get_strict_schema(json_load('release-package-schema.json'))) + json_dump(directory / 'record-package-schema.json', get_strict_schema(json_load('record-package-schema.json'))) @cli.command()