diff --git a/trafilatura/utils.py b/trafilatura/utils.py index 84fcfd3c..4ff5e941 100644 --- a/trafilatura/utils.py +++ b/trafilatura/utils.py @@ -462,7 +462,7 @@ def copy_attributes(dest_elem: _Element, src_elem: _Element) -> None: dest_elem.set(key, src_elem.attrib[key]) -def is_in_table_cell(elem: _Element) -> bool: +def is_in_table_cell(elem: Optional[_Element]) -> bool: '''Check whether an element is in a table cell''' while elem is not None: if elem.tag == 'cell':