Skip to content

tux.cli.dev

Development tools and utilities for Tux.

Functions:

Name Description
lint

Run linting with Ruff.

lint_fix

Run linting with Ruff and apply fixes.

format_code

Format code with Ruff.

type_check

Check types with Pyright.

check

Run pre-commit checks.

Functions

lint() -> int

Run linting with Ruff.

Source code in tux/cli/dev.py
Python
@command_registration_decorator(dev_group, name="lint")
def lint() -> int:
    """Run linting with Ruff."""
    return run_command(["ruff", "check", "."])

lint_fix() -> int

Run linting with Ruff and apply fixes.

Source code in tux/cli/dev.py
Python
@command_registration_decorator(dev_group, name="lint-fix")
def lint_fix() -> int:
    """Run linting with Ruff and apply fixes."""
    return run_command(["ruff", "check", "--fix", "."])

format_code() -> int

Format code with Ruff.

Source code in tux/cli/dev.py
Python
@command_registration_decorator(dev_group, name="format")
def format_code() -> int:
    """Format code with Ruff."""
    return run_command(["ruff", "format", "."])

type_check() -> int

Check types with Pyright.

Source code in tux/cli/dev.py
Python
@command_registration_decorator(dev_group, name="type-check")
def type_check() -> int:
    """Check types with Pyright."""
    return run_command(["pyright"])

check() -> int

Run pre-commit checks.

Source code in tux/cli/dev.py
Python
@command_registration_decorator(dev_group, name="pre-commit")
def check() -> int:
    """Run pre-commit checks."""
    return run_command(["pre-commit", "run", "--all-files"])