mirror of
https://github.com/aljazceru/Auditor.git
synced 2025-12-18 11:54:18 +01:00
Initial commit: TheAuditor v1.0.1 - AI-centric SAST and Code Intelligence Platform
This commit is contained in:
21
theauditor/commands/init_config.py
Normal file
21
theauditor/commands/init_config.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Ensure minimal mypy config exists (idempotent)."""
|
||||
|
||||
import click
|
||||
|
||||
|
||||
@click.command("init-config")
|
||||
@click.option("--pyproject", default="pyproject.toml", help="Path to pyproject.toml")
|
||||
def init_config(pyproject):
|
||||
"""Ensure minimal mypy config exists (idempotent)."""
|
||||
from theauditor.config import ensure_mypy_config
|
||||
|
||||
try:
|
||||
res = ensure_mypy_config(pyproject)
|
||||
msg = (
|
||||
"mypy config created"
|
||||
if res.get("status") == "created"
|
||||
else "mypy config already present"
|
||||
)
|
||||
click.echo(msg)
|
||||
except Exception as e:
|
||||
raise click.ClickException(f"Failed to init config: {e}") from e
|
||||
Reference in New Issue
Block a user