Skip to content

Commit 20848ab

Browse files
committed
Fix python 3.9 support
1 parent 55ae546 commit 20848ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reactpy/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44
from collections.abc import Iterable
55
from itertools import chain
6-
from typing import Any, Callable, Generic, TypeVar, cast
6+
from typing import Any, Callable, Generic, TypeVar, Union, cast
77

88
from lxml import etree
99
from lxml.html import fromstring, tostring
@@ -254,7 +254,7 @@ def _component_to_vdom(component: ComponentType) -> VdomDict | str | None:
254254
result = component.render()
255255
if hasattr(result, "render"):
256256
result = _component_to_vdom(cast(ComponentType, result))
257-
return cast(VdomDict | str | None, result)
257+
return cast(Union[VdomDict, str, None], result)
258258

259259

260260
def del_html_head_body_transform(vdom: VdomDict) -> VdomDict:

0 commit comments

Comments
 (0)