Coverage for lintro / config / tool_config.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
1"""Tool configuration model."""
3from pydantic import BaseModel, ConfigDict
6class LintroToolConfig(BaseModel):
7 """Configuration for a single tool.
9 In the tiered model, tools use their native configs by default.
10 Lintro only controls whether tools run and optionally specifies
11 an explicit config source path.
13 Attributes:
14 model_config: Pydantic model configuration (class-level).
15 enabled: Whether the tool is enabled.
16 config_source: Optional explicit path to native config file.
17 If not set, tool uses its own config discovery.
18 auto_install: Per-tool auto-install override.
19 None means inherit from global setting.
20 """
22 model_config = ConfigDict(frozen=False, extra="forbid")
24 enabled: bool = True
25 config_source: str | None = None
26 auto_install: bool | None = None