Skip to content

Commit 7ba002d

Browse files
Merge pull request #317 from adamtheturtle/line-no
Put a line number in another error
2 parents 59ec7cf + 8573ac9 commit 7ba002d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/sphinx_notion/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,10 @@ def _(
816816
bulleted_item_block.append(blocks=child_blocks)
817817
result.append(bulleted_item_block)
818818
else:
819-
assert isinstance(first_child, checkbox_label)
819+
assert isinstance(first_child, checkbox_label), (
820+
first_child.line,
821+
first_child.source,
822+
)
820823
label_text_node = list_item.children[1]
821824
# Get the checked state from the checkbox_label node
822825
checked = first_child.attributes.get("checked", False)
@@ -864,7 +867,10 @@ def _(
864867
block.append(blocks=child_blocks)
865868
result.append(block)
866869
else:
867-
assert isinstance(first_child, checkbox_label)
870+
assert isinstance(first_child, checkbox_label), (
871+
first_child.line,
872+
first_child.source,
873+
)
868874
label_text_node = list_item.children[1]
869875
# Get the checked state from the checkbox_label node
870876
checked = first_child.attributes.get("checked", False)

0 commit comments

Comments
 (0)