Skip to content

Commit 38d6c4f

Browse files
committed
Fix Python 3.9 compatibility in conftest
Use explicit Union[..., None] instead of | None or Optional[]. The | operator for union types is only supported in Python 3.10+. Union syntax works across all Python versions.
1 parent ea79811 commit 38d6c4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ def _assert_positions(text: str, nodes: list[dict[str, Any]]) -> None:
5454
return _assert_positions
5555

5656

57-
def convert(html: str, callback: Callable[..., dict[str, Union[str, int]]] | None = None, file: str = "") -> str:
57+
def convert(html: str, callback: Union[Callable[..., dict[str, Union[str, int]]], None] = None, file: str = "") -> str:
5858
"""Helper to convert HTML to text with optional callback and file parameter."""
5959
return html_to_text(html, node_parsed_callback=callback, file=file)

0 commit comments

Comments
 (0)