mirror of
https://github.com/pstrueb/piper.git
synced 2026-05-02 12:28:01 +00:00
Slight refactor of scripts, cleaning
This commit is contained in:
16
src/python_run/script/lint
Executable file
16
src/python_run/script/lint
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
import subprocess
|
||||
import venv
|
||||
from pathlib import Path
|
||||
|
||||
_DIR = Path(__file__).parent
|
||||
_PROGRAM_DIR = _DIR.parent
|
||||
_VENV_DIR = _PROGRAM_DIR / ".venv"
|
||||
_MODULE_DIR = _PROGRAM_DIR / "piper"
|
||||
|
||||
context = venv.EnvBuilder().ensure_directories(_VENV_DIR)
|
||||
subprocess.check_call([context.env_exe, "-m", "black", str(_MODULE_DIR), "--check"])
|
||||
subprocess.check_call([context.env_exe, "-m", "isort", str(_MODULE_DIR), "--check"])
|
||||
subprocess.check_call([context.env_exe, "-m", "flake8", str(_MODULE_DIR)])
|
||||
subprocess.check_call([context.env_exe, "-m", "pylint", str(_MODULE_DIR)])
|
||||
subprocess.check_call([context.env_exe, "-m", "mypy", str(_MODULE_DIR)])
|
||||
Reference in New Issue
Block a user