From cf083fc0c3f1557aa2d5cbbe657b915291c0d948 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Tue, 23 Jun 2026 10:58:45 +0200 Subject: [PATCH] fix(types): add str methods to dataframe types --- midas/checker/types.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/midas/checker/types.py b/midas/checker/types.py index d580f62..471e805 100644 --- a/midas/checker/types.py +++ b/midas/checker/types.py @@ -160,11 +160,18 @@ class ConstraintType: class ColumnType: type: Type + def __str__(self) -> str: + return f"Column[{self.type}]" + @dataclass(frozen=True, kw_only=True) class DataFrameType: columns: list[Column] + def __str__(self) -> str: + schema: list[str] = [f"{col.name}: {col.type}" for col in self.columns] + return f"Frame[{', '.join(schema)}]" + @dataclass(frozen=True, kw_only=True) class Column: index: int