| 103 | |
| 104 | @dataclass |
| 105 | class ExamplesTable: |
| 106 | location: Location |
| 107 | tags: list[Tag] |
| 108 | name: str | None = None |
| 109 | table_header: Row | None = None |
| 110 | table_body: list[Row] | None = field(default_factory=list) |
| 111 | |
| 112 | @classmethod |
| 113 | def from_dict(cls, data: dict[str, Any]) -> Self: |
| 114 | return cls( |
| 115 | location=Location.from_dict(data["location"]), |
| 116 | name=data.get("name"), |
| 117 | table_header=Row.from_dict(data["tableHeader"]) if data.get("tableHeader") else None, |
| 118 | table_body=[Row.from_dict(row) for row in data.get("tableBody", [])], |
| 119 | tags=[Tag.from_dict(tag) for tag in data["tags"]], |
| 120 | ) |
| 121 | |
| 122 | |
| 123 | @dataclass |
no outgoing calls
searching dependent graphs…