Spaces:
Running
Running
File size: 573 Bytes
13a7d69 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
"""Check tasks for the project."""
# %% IMPORTS
from invoke import task
from invoke.context import Context
# %% TASKS
@task
def type(ctx: Context) -> None:
"""Check the types with mypy."""
ctx.run("mypy *.py")
@task
def code(ctx: Context) -> None:
"""Check the codes with ruff check."""
ctx.run("ruff check *.py")
@task
def format(ctx: Context) -> None:
"""Check the formats with ruff format."""
ctx.run("ruff format --check *.py")
@task(pre=[type, code, format], default=True)
def all(_: Context) -> None:
"""Run all check tasks."""
|