aurtomata/scripts/dev.py
2024-11-01 13:14:26 +02:00

21 lines
391 B
Python

import subprocess
def run(*commands: str) -> int:
result_code = 0
for command in commands:
process = subprocess.run(command, shell=True)
result_code |= process.returncode
return result_code
def format() -> int:
return run("isort .", "black .")
def lint() -> int:
return run("pyright .", "pyflakes .")
def test() -> int:
return run("pytest .")