Make the generate-scope-table script autoformat its output

This commit is contained in:
Erik Sundell
2022-01-10 10:48:01 +01:00
parent 8da06d1259
commit 807c5b8ff9

View File

@@ -16,6 +16,7 @@ The files are:
import os import os
from collections import defaultdict from collections import defaultdict
from pathlib import Path from pathlib import Path
from subprocess import run
from pytablewriter import MarkdownTableWriter from pytablewriter import MarkdownTableWriter
from ruamel.yaml import YAML from ruamel.yaml import YAML
@@ -143,6 +144,12 @@ class ScopeTableGenerator:
with open(filename, 'w') as f: with open(filename, 'w') as f:
yaml.dump(content, f) yaml.dump(content, f)
run(
['pre-commit', 'run', 'prettier', '--files', filename],
cwd=HERE,
check=False,
)
def main(): def main():
table_generator = ScopeTableGenerator() table_generator = ScopeTableGenerator()