Skip to content

Commit

Permalink
fix/Fix union in python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
maledorak committed Dec 19, 2024
1 parent 6868f01 commit a57b5d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion emmetify/nodes/html_nodes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Union
from dataclasses import dataclass, field

from bs4 import Tag
Expand Down Expand Up @@ -93,7 +94,7 @@ def get_or_create_node(self, tag: Tag, is_root: bool = False) -> str:

return new_id

def get_node(self, node_id: str) -> HtmlNode | None:
def get_node(self, node_id: str) -> Union[HtmlNode, None]:
"""Get node by ID."""
return self._nodes.get(node_id)

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup :: HTML",
Expand Down

0 comments on commit a57b5d7

Please sign in to comment.