Skip to content

Commit 8817a2d

Browse files
committed
fix: correct import for unescape
Surfaced via `mypy`, in that the `html.parser` module does not have a direct implementation of `unescape`. Refs: https://docs.python.org/3.6/library/html.html#html.unescape In pypa#192 support for Python 2.7 was removed, the import path changed. This works due to imports placing the imported code in the local scope. If the `html.parser` module ever stopped importing `unescape`, this import would break as a result. Signed-off-by: Mike Fiedler <[email protected]>
1 parent bdae3c3 commit 8817a2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme_renderer/markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import re
1717
import warnings
1818

19-
from html.parser import unescape
19+
from html import unescape
2020

2121
import pygments
2222
import pygments.lexers

0 commit comments

Comments
 (0)