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

1"""Tool configuration model.""" 

2 

3from pydantic import BaseModel, ConfigDict 

4 

5 

6class LintroToolConfig(BaseModel): 

7 """Configuration for a single tool. 

8 

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. 

12 

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 """ 

21 

22 model_config = ConfigDict(frozen=False, extra="forbid") 

23 

24 enabled: bool = True 

25 config_source: str | None = None 

26 auto_install: bool | None = None