mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fixup
Warning and missing typing function
This commit is contained in:
parent
a4b7927a29
commit
58beeed235
@ -44,7 +44,7 @@ from sphinx.util import texescape
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from typing import Any, Callable, Dict, List, Pattern # NOQA
|
||||
from typing import Any, Callable, Dict, List, Pattern, Union # NOQA
|
||||
|
||||
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
|
||||
|
||||
@ -149,7 +149,7 @@ def term_decode(text):
|
||||
# If ascii is safe, use it with no warning
|
||||
if text.decode('ascii', 'replace').encode('ascii', 'replace') == text:
|
||||
return text.decode('ascii')
|
||||
|
||||
|
||||
print(turquoise('* Note: non-ASCII characters entered '
|
||||
'and terminal encoding unknown -- assuming '
|
||||
'UTF-8 or Latin-1.'))
|
||||
|
Loading…
Reference in New Issue
Block a user