2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 05:46:34 +00:00

pylint checks

This commit is contained in:
Matthias Mair
2024-08-20 00:26:32 +02:00
parent c197358ce4
commit 8a163237ac
24 changed files with 54 additions and 46 deletions

@ -73,7 +73,7 @@ def generate_schema_file(key: str) -> None:
print('Writing schema file to:', output_file)
with open(output_file, 'w') as f:
with open(output_file, 'w', encoding='utf-8') as f:
f.write(output)
@ -119,7 +119,7 @@ def generate_index_file(version: str):
print('Writing index file to:', output_file)
with open(output_file, 'w') as f:
with open(output_file, 'w', encoding='utf-8') as f:
f.write(output)
@ -171,7 +171,7 @@ def parse_api_file(filename: str):
The intent is to make the API schema easier to peruse on the documentation.
"""
with open(filename) as f:
with open(filename, encoding='utf-8') as f:
data = yaml.safe_load(f)
paths = data['paths']
@ -211,7 +211,7 @@ def parse_api_file(filename: str):
output_file = os.path.abspath(output_file)
with open(output_file, 'w') as f:
with open(output_file, 'w', encoding='utf-8') as f:
yaml.dump(output, f)
# Generate a markdown file for the schema