Skip to content

Commit 488c43e

Browse files
committed
chore: fix for mypy
1 parent 8aac3da commit 488c43e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/mistune/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import re
2-
from html import _replace_charref # type: ignore[attr-defined]
3-
from typing import Match
2+
import html
3+
from typing import Callable, Match, cast
44
from urllib.parse import quote
55

66
_expand_tab_re = re.compile(r"^( {0,3})\t", flags=re.M)
7+
_replace_charref = cast(Callable[[Match[str]], str], getattr(html, "_replace_charref"))
78

89

910
def expand_leading_tab(text: str, width: int = 4) -> str:

0 commit comments

Comments
 (0)