diff options
| author | Fuwn <[email protected]> | 2022-09-23 22:42:14 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-09-23 22:42:14 -0700 |
| commit | 5bc398b5166e49147fa5fac41de0bc866a2159e0 (patch) | |
| tree | b273f21291c9b326297971bafed9ac0b1d5e9b49 /make.py | |
| download | machinis-5bc398b5166e49147fa5fac41de0bc866a2159e0.tar.xz machinis-5bc398b5166e49147fa5fac41de0bc866a2159e0.zip | |
feat: initial commit
Diffstat (limited to 'make.py')
| -rw-r--r-- | make.py | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -0,0 +1,54 @@ +# This file is part of machinis <https://github.com/Fuwn/machinis>. +# +# All rights reserved +# +# Copyright (C) 2022-2022 Fuwn <[email protected]> +# SPDX-License-Identifier: UNLICENSED + +# type: ignore + +import subprocess +import sys + +import sane + +CC: str = {"win32": "python"}.get(sys.platform, "python3") +POETRY: str = {"win32": "poetry.bat"}.get(sys.platform, "poetry") + + +def run(): + subprocess.run(f"{POETRY} run {CC} -m machinis") + + +def fmt(): + subprocess.run(f"{POETRY} run black . -q") + + +def sort(): + subprocess.run(f"{POETRY} run isort machinis make.py") + + +def typing(): + subprocess.run(f"{POETRY} run mypy . --strict --no-error-summary") + + +def spelling(): + subprocess.run(f"{POETRY} run codespell machinis make.py") + + +def safety(): + subprocess.run(f"{POETRY} run safety check --bare") # --full-report + + [email protected](recipe_deps=["fmt", "sort", "typing", "spelling", "safety"]) +def check(): + pass + + +sane.sane_run(run) |