From a42df2309967046bbeb390f8ca4f1b004e552a7a Mon Sep 17 00:00:00 2001 From: CodyInnowhere Date: Fri, 13 Dec 2024 23:25:55 +0800 Subject: [PATCH] fix type check --- trafilatura/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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':