Verified Commit 50f574f6 authored by Dan Jones's avatar Dan Jones
Browse files

chore: lint changes with black

3 merge requests!59Release v2.0.0,!39Resolve "Refactor GeoJSON loading for serving from nucleus",!36Resolve "Create temporary mas-dt branch for initial schema refactor"
...@@ -205,16 +205,16 @@ def get_cached_ref(remote_ref): ...@@ -205,16 +205,16 @@ def get_cached_ref(remote_ref):
ref = None ref = None
if os.path.exists(ref_path): if os.path.exists(ref_path):
print(f"loading cached ref: {remote_ref}") print(f"loading cached ref: {remote_ref}")
with open(ref_path, 'r') as ref_file: with open(ref_path, "r") as ref_file:
ref = json.load(ref_file) ref = json.load(ref_file)
return ref return ref
def store_cached_ref(remote_ref, definition): def store_cached_ref(remote_ref, definition):
ref_path = get_remote_ref_cache_path(remote_ref) ref_path = get_remote_ref_cache_path(remote_ref)
ref_dirs = re.sub(r'\/[^\/]+$', '', ref_path) ref_dirs = re.sub(r"\/[^\/]+$", "", ref_path)
os.makedirs(ref_dirs, 0o775, True) os.makedirs(ref_dirs, 0o775, True)
with open(ref_path, 'w') as ref_file: with open(ref_path, "w") as ref_file:
json.dump(definition, ref_file) json.dump(definition, ref_file)
...@@ -393,7 +393,7 @@ if __name__ == "__main__": ...@@ -393,7 +393,7 @@ if __name__ == "__main__":
# Parse script args # Parse script args
config = get_options() config = get_options()
swagger_config = get_swagger_config(config.get('reload_schemas')) swagger_config = get_swagger_config(config.get("reload_schemas"))
# Output compiled schema # Output compiled schema
if config.get("output_file"): if config.get("output_file"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment