Skip to content

Commit b48bfe5

Browse files
authored
Merge pull request #67 from dfop02/fix/python-support
Fix Python 3.7>= x <3.10 support
2 parents 34a1da5 + 263bc16 commit b48bfe5

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Release History
1414

1515
- Fixes `#62 <https://github.com/dfop02/html4docx/issues/62>`_ : `tag_style_override` not applying custom styles from a Word template. | `dfop02 <https://github.com/dfop02>`_
1616
- Handle invalid rowspan and colspan values in tables. | `dfop02 <https://github.com/dfop02>`_ inspired by `PR #56 <https://github.com/dfop02/html4docx/pull/56>`_ from `kko-harvey <https://github.com/kko-harvey>`_ .
17+
- Fixes `#67 <https://github.com/dfop02/html4docx/issues/67>`_: built-in typing was not supported by old python versions. | `dfop02 <https://github.com/dfop02>`_
1718

1819
**New Features**
1920

html4docx/h4d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import re
55
from io import BytesIO
66
from html.parser import HTMLParser
7+
from typing import Dict, Any
78

89
import docx
910
from bs4 import BeautifulSoup
@@ -64,7 +65,7 @@ def set_initial_attrs(self, document=None):
6465
self.pending_important_styles = None
6566

6667
@property
67-
def metadata(self) -> dict[str, any]:
68+
def metadata(self) -> Dict[str, Any]:
6869
if not hasattr(self, '_metadata'):
6970
self._metadata = Metadata(self.doc)
7071
return self._metadata

0 commit comments

Comments
 (0)