Skip to content

Commit

Permalink
assert Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
karanataryn committed Feb 11, 2025
1 parent 6e8dac2 commit 8ebe60f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sycamore/sycamore/data/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def from_html(cls, html_str: Optional[str] = None, html_tag: Optional[Tag] = Non

cells = []
caption = None

assert isinstance(root, Tag), "Expected root to be a Tag"
# Traverse the tree of elements in a pre-order traversal.
for tag in root.find_all(recursive=True):
if tag.name == "tr":
Expand Down

0 comments on commit 8ebe60f

Please sign in to comment.