Skip to content

Commit c75e6f4

Browse files
committed
Update _core.py
1 parent 60803c3 commit c75e6f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

htmltools/_core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ def _repr_html_(self) -> str: ...
254254
# =============================================================================
255255
# TagList class
256256
# =============================================================================
257-
class TagList(UserList[TagNode]):
257+
_TagListParentClass = UserList if sys.version_info <= (3, 8) else UserList[TagNode]
258+
259+
260+
class TagList(_TagListParentClass):
258261
"""
259262
Create an HTML tag list (i.e., a fragment of HTML)
260263

0 commit comments

Comments
 (0)