Skip to content

Commit 0b738d3

Browse files
document use of print instead of f.write in schema generator comment
1 parent 7f7830c commit 0b738d3

File tree

1 file changed

+3
-0
lines changed
  • src/geophires_x_schema_generator

1 file changed

+3
-0
lines changed

src/geophires_x_schema_generator/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def build(json_file_name_prefix: str, generator: GeophiresXSchemaGenerator, rst_
2323

2424
request_build_path = Path(build_dir, f'{json_file_name_prefix}request.json')
2525
with open(request_build_path, 'w', encoding='utf-8') as f:
26+
2627
print(json.dumps(request_schema_json, indent=2), file=f)
28+
# using print([...], file=f) instead of f.write avoids need for pre-commit end of file fix
29+
2730
print(f'Wrote request JSON schema file to {request_build_path}.')
2831

2932
if result_schema_json is not None:

0 commit comments

Comments
 (0)