Coverage for src/debputy/lsp/config/config_options.py: 100%
12 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-09-07 09:27 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-09-07 09:27 +0000
1import dataclasses
2from typing import Generic, Optional, Type, List
4from debputy.util import T
6ALL_DEBPUTY_CONFIG_OPTIONS: List["DebputyConfigOption"] = []
9@dataclasses.dataclass(slots=True, frozen=True)
10class DebputyConfigOption(Generic[T]):
11 config_name: str
12 value_type: Type[T]
13 default_value: Optional[T] = None
15 def __post_init__(self) -> None:
16 ALL_DEBPUTY_CONFIG_OPTIONS.append(self)
19DCO_SPELLCHECK_COMMENTS = DebputyConfigOption(
20 "diagnostics.spellchecking.spellcheck-comments",
21 bool,
22 default_value=True,
23)