diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-11 20:50:43 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-11 20:50:43 +0300 |
commit | 279e547860ea68e3c357f55e608afec682a1f961 (patch) | |
tree | dc08e85ab0210538e30b5b801bf9d80ab49bfb3f /sphinx/application.py | |
parent | 859b5fcea71f8d4f46e0ef3726e68df54bfbc3b7 (diff) | |
parent | 64fb1e56242d93ee0e8c317ab9e7643242b99658 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/application.py')
-rw-r--r-- | sphinx/application.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sphinx/application.py b/sphinx/application.py index e432db245..7661b82d6 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -17,8 +17,7 @@ import sys from collections import deque from io import StringIO from os import path -from typing import Any, Callable, Dict, IO, List, Optional, Tuple, Type, Union -from typing import TYPE_CHECKING +from typing import IO, TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Type, Union from docutils import nodes from docutils.nodes import Element, TextElement @@ -28,7 +27,7 @@ from docutils.transforms import Transform from pygments.lexer import Lexer import sphinx -from sphinx import package_dir, locale +from sphinx import locale, package_dir from sphinx.config import Config from sphinx.domains import Domain, Index from sphinx.environment import BuildEnvironment @@ -42,9 +41,7 @@ from sphinx.project import Project from sphinx.registry import SphinxComponentRegistry from sphinx.roles import XRefRole from sphinx.theming import Theme -from sphinx.util import docutils -from sphinx.util import logging -from sphinx.util import progress_message +from sphinx.util import docutils, logging, progress_message from sphinx.util.build_phase import BuildPhase from sphinx.util.console import bold # type: ignore from sphinx.util.i18n import CatalogRepository @@ -54,6 +51,8 @@ from sphinx.util.tags import Tags from sphinx.util.typing import RoleFunction, TitleGetter if TYPE_CHECKING: + from docutils.nodes import Node # NOQA + from sphinx.builders import Builder @@ -1068,7 +1067,7 @@ class Sphinx: .. versionadded:: 1.1 """ logger.debug('[app] adding search language: %r', cls) - from sphinx.search import languages, SearchLanguage + from sphinx.search import SearchLanguage, languages assert issubclass(cls, SearchLanguage) languages[cls.lang] = cls |