summaryrefslogtreecommitdiff
path: root/sphinx/testing/util.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-10 00:32:26 +0900
committerGitHub <noreply@github.com>2021-04-10 00:32:26 +0900
commitfe6d95e4294f47d61f1a04a1f8c6567c9802f504 (patch)
tree33a7143bf1dcf60830c2e1fcd4b396175af45e64 /sphinx/testing/util.py
parent7327e56dff865d4766c43d46405ae827e10fd6c3 (diff)
parentce5d66e618c111b115a9bb7b1401a26483fcfa8f (diff)
downloadsphinx-git-fe6d95e4294f47d61f1a04a1f8c6567c9802f504.tar.gz
Merge branch 'master' into patch-1
Diffstat (limited to 'sphinx/testing/util.py')
-rw-r--r--sphinx/testing/util.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py
index 7d0cde143..bfbb1071c 100644
--- a/sphinx/testing/util.py
+++ b/sphinx/testing/util.py
@@ -21,15 +21,12 @@ from docutils.nodes import Node
from docutils.parsers.rst import directives, roles
from sphinx import application, locale
-from sphinx.deprecation import RemovedInSphinx40Warning
from sphinx.pycode import ModuleAnalyzer
from sphinx.testing.path import path
from sphinx.util.osutil import relpath
__all__ = [
- 'Struct',
- 'SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding',
- 'remove_unicode_literals',
+ 'Struct', 'SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding',
]
@@ -102,8 +99,8 @@ class SphinxTestApp(application.Sphinx):
A subclass of :class:`Sphinx` that runs on the test root, with some
better default values for the initialization parameters.
"""
- _status = None # type: StringIO
- _warning = None # type: StringIO
+ _status: StringIO = None
+ _warning: StringIO = None
def __init__(self, buildername: str = 'html', srcdir: path = None, freshenv: bool = False,
confoverrides: Dict = None, status: IO = None, warning: IO = None,
@@ -177,12 +174,6 @@ class SphinxTestAppWrapperForSkipBuilding:
_unicode_literals_re = re.compile(r'u(".*?")|u(\'.*?\')')
-def remove_unicode_literals(s: str) -> str:
- warnings.warn('remove_unicode_literals() is deprecated.',
- RemovedInSphinx40Warning, stacklevel=2)
- return _unicode_literals_re.sub(lambda x: x.group(1) or x.group(2), s)
-
-
def find_files(root: str, suffix: bool = None) -> Generator[str, None, None]:
for dirpath, dirs, files in os.walk(root, followlinks=True):
dirpath = path(dirpath)