55from typing import Self , Any , Annotated , Literal
66
77from colorama import Fore
8- from pydantic import BaseModel , Field , model_validator , BeforeValidator
8+ from pydantic import Field , model_validator , BeforeValidator
99
10+ from dbt_contracts ._core import BaseModelConfig
1011from dbt_contracts .contracts .result import Result
1112from dbt_contracts .contracts .utils import to_tuple
1213from dbt_contracts .formatters import ResultsFormatter
@@ -22,7 +23,7 @@ def _align_and_pad_print_length(value: str, alignment: Literal["<", "^", ">"], w
2223 return f"{ value :{alignment }{width }} "
2324
2425
25- class TableCellBuilder [T : Result ](BaseModel ):
26+ class TableCellBuilder [T : Result ](BaseModelConfig ):
2627 key : str | Callable [[T ], str ] = Field (
2728 description = "The key to use to get the value from the :py:class:`.Result` "
2829 "or a callable object which returns a formatted string for the value" ,
@@ -151,7 +152,7 @@ def build(self, result: T, min_width: int = None) -> str:
151152 return value
152153
153154
154- class TableRowBuilder [T : Result ](BaseModel ):
155+ class TableRowBuilder [T : Result ](BaseModelConfig ):
155156 cells : Sequence [TableCellBuilder [T ]] | Sequence [Sequence [TableCellBuilder [T ] | None ]] = Field (
156157 description = "The cell builders to use to build the row." ,
157158 )
0 commit comments