Skip to content

Commit

Permalink
fix: allow EbdTables to have 0 rows (#291)
Browse files Browse the repository at this point in the history
Co-authored-by: Konstantin <[email protected]>
  • Loading branch information
hf-kklein and Konstantin authored Nov 7, 2024
1 parent 332ad8d commit dc56681
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rebdhuhn/models/ebd_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,16 @@ class EbdTable:

metadata: EbdTableMetaData = attrs.field(validator=attrs.validators.instance_of(EbdTableMetaData))
"""
meta data about the table
meta data about the table.
"""
rows: List[EbdTableRow] = attrs.field(
validator=attrs.validators.deep_iterable(
member_validator=attrs.validators.instance_of(EbdTableRow), iterable_validator=attrs.validators.min_len(1)
member_validator=attrs.validators.instance_of(EbdTableRow), iterable_validator=attrs.validators.min_len(0)
),
)
"""
rows are the body of the table
rows are the body of the table;
might have 0 rows, if the EBD exists but is just a paragraph of text, no real table
"""
# pylint: disable=duplicate-code
multi_step_instructions: Optional[List[MultiStepInstruction]] = attrs.field(
Expand Down

0 comments on commit dc56681

Please sign in to comment.