Spaces:
Running
Running
"""Format tasks for the project.""" | |
# %% IMPORTS | |
from invoke import task | |
from invoke.context import Context | |
# %% TASKS | |
def imports(ctx: Context) -> None: | |
"""Format code imports with ruff.""" | |
ctx.run("ruff check --select I --fix *.py") | |
def sources(ctx: Context) -> None: | |
"""Format code sources with ruff.""" | |
ctx.run("ruff format *.py") | |
def all(_: Context) -> None: | |
"""Run all format tasks.""" | |