diff --git a/HISTORY.rst b/HISTORY.rst index d569c56..1414385 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,7 @@ Release History - Fixes `#62 `_ : `tag_style_override` not applying custom styles from a Word template. | `dfop02 `_ - Handle invalid rowspan and colspan values in tables. | `dfop02 `_ inspired by `PR #56 `_ from `kko-harvey `_ . +- Fixes `#67 `_: built-in typing was not supported by old python versions. | `dfop02 `_ **New Features** diff --git a/html4docx/h4d.py b/html4docx/h4d.py index c4bd260..85b992a 100644 --- a/html4docx/h4d.py +++ b/html4docx/h4d.py @@ -4,6 +4,7 @@ import re from io import BytesIO from html.parser import HTMLParser +from typing import Dict, Any import docx from bs4 import BeautifulSoup @@ -64,7 +65,7 @@ def set_initial_attrs(self, document=None): self.pending_important_styles = None @property - def metadata(self) -> dict[str, any]: + def metadata(self) -> Dict[str, Any]: if not hasattr(self, '_metadata'): self._metadata = Metadata(self.doc) return self._metadata