Skip to content

Check Config

polars_labrodq_extension.config.models.CheckConfig dataclass

Source code in src/polars_labrodq_extension/config/models.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@dataclass
class CheckConfig:
    name: str
    type: str
    column: str
    level: str = "error"
    params: dict[str, Any] = field(default_factory=dict)

    def to_check_def(self) -> CheckDef:
        return CheckDef(
            name=self.name,
            type=self.type,
            column=self.column,
            level=Severity.from_str(self.level),
            params=self.params or None,
        )

column instance-attribute

level = 'error' class-attribute instance-attribute

name instance-attribute

params = field(default_factory=dict) class-attribute instance-attribute

type instance-attribute

to_check_def()

Source code in src/polars_labrodq_extension/config/models.py
17
18
19
20
21
22
23
24
def to_check_def(self) -> CheckDef:
    return CheckDef(
        name=self.name,
        type=self.type,
        column=self.column,
        level=Severity.from_str(self.level),
        params=self.params or None,
    )