mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix mypy violations
This commit is contained in:
parent
3acac58e57
commit
e3b9469683
@ -171,7 +171,7 @@ chm_locales = {
|
||||
|
||||
|
||||
def chm_htmlescape(*args, **kwargs):
|
||||
# type: (*Any, **Any) -> unicode
|
||||
# type: (*Any, **Any) -> str
|
||||
"""
|
||||
chm_htmlescape() is a wrapper of htmlescape().
|
||||
.hhc/.hhk files don't recognize hex escaping, we need convert
|
||||
@ -180,7 +180,7 @@ def chm_htmlescape(*args, **kwargs):
|
||||
quote `'`, this wrapper fixes this.
|
||||
"""
|
||||
def convert(matchobj):
|
||||
# type: (Match[unicode]) -> unicode
|
||||
# type: (Match[str]) -> str
|
||||
codepoint = int(matchobj.group(1), 16)
|
||||
return '&#%d;' % codepoint
|
||||
return re.sub(r'&#[xX]([0-9a-fA-F]+);',
|
||||
|
Loading…
Reference in New Issue
Block a user