Skip to content

Commit

Permalink
use subprocess for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschulz-COL committed Oct 30, 2023
1 parent 4fb900a commit 91f9fb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vizro-core/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ prep-release = [
'echo "Now raise a PR to merge into main with title: Release of vizro-core $(hatch version)"'
]
pypath = "python -c 'import sys; print(sys.executable)'"
schema = ["python schemas/generate.py {args}", "lint"]
schema = "python schemas/generate.py {args}"
secrets = "pre-commit run gitleaks --all-files"
test = [
"test-unit",
Expand Down
2 changes: 2 additions & 0 deletions vizro-core/schemas/generate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Script to generate JSON schema. For more information, run `hatch run schema --help`."""
import argparse
import json
import subprocess
import sys
from pathlib import Path

Expand All @@ -21,3 +22,4 @@
print("JSON schema is up to date.") # noqa: T201
else:
schema_path.write_text(schema_json)
subprocess.run("hatch run lint", shell=True, stdout=subprocess.DEVNULL) # nosec

0 comments on commit 91f9fb1

Please sign in to comment.