Skip to content

Commit

Permalink
fix mypy syntax for old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Feb 7, 2025
1 parent e2b5779 commit be5b421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trafilatura/htmlprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def convert_quotes(elem: _Element) -> None:
code_flag = True
elem.tag = "code" if code_flag else "quote"

def _is_code_block(text: str | None) -> bool:
def _is_code_block(text: Optional[str]) -> bool:
"Check if the element text is part of a code block."
if not text:
return False
Expand Down

0 comments on commit be5b421

Please sign in to comment.