Merge branch '1.7'

This commit is contained in:
Takeshi KOMIYA 2018-02-18 12:39:07 +09:00
commit f8bb40ab30
150 changed files with 464 additions and 349 deletions

6
.codecov.yml Normal file
View File

@ -0,0 +1,6 @@
coverage:
status:
patch:
default:
# allowed to drop X% and still result in a "success" commit status
threshold: 0.05

View File

@ -60,6 +60,13 @@ Features added
Bugs fixed
----------
* #4608: epub: Invalid meta tag is generated
* #4260: autodoc: keyword only argument separator is not disappeared if it is
appeared at top of the argument list
* #4622: epub: :confval:`epub_scheme` does not effect to content.opf
* #4627: graphviz: Fit graphviz images to page
* #4617: quickstart: PROJECT_DIR argument is required
Testing
--------

View File

@ -18,7 +18,6 @@ import os
import warnings
from os import path
from .cmd import build
from .deprecation import RemovedInNextVersionWarning
from .deprecation import RemovedInSphinx20Warning
@ -72,6 +71,7 @@ if __version__.endswith('+'):
def main(*args, **kwargs):
# type: (Any, Any) -> int
from .cmd import build
warnings.warn(
'`sphinx.main()` has moved to `sphinx.cmd.build.main()`.',
RemovedInSphinx20Warning,
@ -81,6 +81,7 @@ def main(*args, **kwargs):
if __name__ == '__main__':
from .cmd import build
warnings.warn(
'`sphinx` has moved to `sphinx.build`.',
RemovedInSphinx20Warning,

View File

@ -9,10 +9,11 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
if False:
# For type annotation
if TYPE_CHECKING:
from typing import List, Sequence # NOQA

View File

@ -19,6 +19,7 @@ import warnings
from collections import deque
from inspect import isclass
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives, roles
@ -45,8 +46,7 @@ from sphinx.util.i18n import find_catalog_source_files
from sphinx.util.osutil import abspath, ensuredir
from sphinx.util.tags import Tags
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Tuple, Type, Union # NOQA
from docutils.parsers import Parser # NOQA
from docutils.transform import Transform # NOQA
@ -136,9 +136,9 @@ class Sphinx(object):
self.html_themes = {} # type: Dict[unicode, unicode]
# validate provided directories
self.srcdir = abspath(srcdir)
self.outdir = abspath(outdir)
self.doctreedir = abspath(doctreedir)
self.srcdir = abspath(srcdir) # type: unicode
self.outdir = abspath(outdir) # type: unicode
self.doctreedir = abspath(doctreedir) # type: unicode
self.confdir = confdir
if self.confdir: # confdir is optional
self.confdir = abspath(self.confdir)

View File

@ -11,6 +11,7 @@
import warnings
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
@ -32,8 +33,7 @@ try:
except ImportError:
multiprocessing = None
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterable, List, Sequence, Set, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA

View File

@ -13,6 +13,7 @@ import os
import re
from collections import namedtuple
from os import path
from typing import TYPE_CHECKING
from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
from docutils import nodes
@ -34,8 +35,7 @@ except ImportError:
except ImportError:
Image = None
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -16,6 +16,7 @@ import plistlib
import shlex
import subprocess
from os import path, environ
from typing import TYPE_CHECKING
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.config import string_classes
@ -27,8 +28,7 @@ from sphinx.util.matching import Matcher
from sphinx.util.osutil import copyfile, ensuredir, make_filename
from sphinx.util.pycompat import htmlescape
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -11,6 +11,7 @@
import codecs
from os import path
from typing import TYPE_CHECKING
from six import iteritems
@ -24,8 +25,7 @@ from sphinx.util.fileutil import copy_asset_file
from sphinx.util.osutil import ensuredir, os_path
from sphinx.util.pycompat import htmlescape
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -15,6 +15,7 @@ from __future__ import absolute_import
import gzip
import re
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
@ -29,8 +30,7 @@ try:
except ImportError:
import lxml.etree as etree # type: ignore
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -9,11 +9,11 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.builders import Builder
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Set # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -12,6 +12,7 @@
from collections import namedtuple
from os import path
from typing import TYPE_CHECKING
from sphinx import package_dir
from sphinx.builders import _epub_base
@ -21,8 +22,7 @@ from sphinx.util.fileutil import copy_asset_file
from sphinx.util.i18n import format_date
from sphinx.util.osutil import make_filename
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterable, List # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA
@ -144,6 +144,7 @@ class Epub3Builder(_epub_base.EpubBuilder):
self.globalcontext['theme_writing_mode'] = THEME_WRITING_MODES.get(writing_mode)
self.globalcontext['html_tag'] = self.html_tag
self.globalcontext['use_meta_charset'] = self.use_meta_charset
self.globalcontext['skip_ua_compatible'] = True
def build_navlist(self, navnodes):
# type: (List[nodes.Node]) -> List[NavPoint]

View File

@ -16,6 +16,7 @@ from collections import defaultdict
from datetime import datetime, tzinfo, timedelta
from os import path, walk, getenv
from time import time
from typing import TYPE_CHECKING
from uuid import uuid4
from six import iteritems, StringIO
@ -29,8 +30,7 @@ from sphinx.util.nodes import extract_messages, traverse_translatable_index
from sphinx.util.osutil import safe_relpath, ensuredir, canon_path
from sphinx.util.tags import Tags
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, DefaultDict, Dict, Iterable, List, Set, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.util.i18n import CatalogInfo # NOQA

View File

@ -16,6 +16,7 @@ import sys
import warnings
from hashlib import md5
from os import path
from typing import TYPE_CHECKING
import docutils
from docutils import nodes
@ -51,8 +52,7 @@ from sphinx.util.osutil import SEP, os_path, relative_uri, ensuredir, \
movefile, copyfile
from sphinx.writers.html import HTMLWriter, HTMLTranslator
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, IO, Iterable, Iterator, List, Type, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
@ -600,9 +600,9 @@ class StandaloneHTMLBuilder(Builder):
doctree.settings = self.docsettings
self.secnumbers = self.env.toc_secnumbers.get(docname, {})
self.fignumbers = self.env.toc_fignumbers.get(docname, {})
self.fignumbers = self.env.toc_fignumbers.get(docname, {}) # type: Dict[unicode, Dict[unicode, Tuple[int, ...]]] # NOQA
self.imgpath = relative_uri(self.get_target_uri(docname), '_images')
self.dlpath = relative_uri(self.get_target_uri(docname), '_downloads')
self.dlpath = relative_uri(self.get_target_uri(docname), '_downloads') # type: unicode
self.current_docname = docname
self.docwriter.write(doctree, destination)
self.docwriter.assemble_parts()

View File

@ -14,6 +14,7 @@ from __future__ import print_function
import codecs
import os
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
@ -24,8 +25,7 @@ from sphinx.util import logging
from sphinx.util.osutil import make_filename
from sphinx.util.pycompat import htmlescape
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, IO, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -11,6 +11,7 @@
import os
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.frontend import OptionParser
@ -32,8 +33,7 @@ from sphinx.util.nodes import inline_all_toctrees
from sphinx.util.osutil import SEP, make_filename
from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterable, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA

View File

@ -14,6 +14,7 @@ import re
import socket
import threading
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from requests.exceptions import HTTPError
@ -37,8 +38,7 @@ from sphinx.util.console import ( # type: ignore
)
from sphinx.util.requests import is_ssl_error
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Set, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.requests.requests import Response # NOQA

View File

@ -10,6 +10,7 @@
"""
from os import path
from typing import TYPE_CHECKING
from docutils.frontend import OptionParser
from docutils.io import FileOutput
@ -24,8 +25,7 @@ from sphinx.util.nodes import inline_all_toctrees
from sphinx.util.osutil import make_filename
from sphinx.writers.manpage import ManualPageWriter, ManualPageTranslator
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Set, Union # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -14,6 +14,7 @@ import os
import posixpath
import re
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from six import text_type
@ -26,8 +27,7 @@ from sphinx.util import force_decode, logging
from sphinx.util.osutil import make_filename
from sphinx.util.pycompat import htmlescape
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -11,6 +11,7 @@
import os
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.frontend import OptionParser
@ -30,8 +31,7 @@ from sphinx.util.nodes import inline_all_toctrees
from sphinx.util.osutil import SEP, make_filename
from sphinx.writers.texinfo import TexinfoWriter, TexinfoTranslator
if False:
# For type annotation
if TYPE_CHECKING:
from sphinx.application import Sphinx # NOQA
from typing import Any, Dict, Iterable, List, Tuple, Union # NOQA

View File

@ -11,6 +11,7 @@
import codecs
from os import path
from typing import TYPE_CHECKING
from docutils.io import StringOutput
@ -19,8 +20,7 @@ from sphinx.util import logging
from sphinx.util.osutil import ensuredir, os_path
from sphinx.writers.text import TextWriter, TextTranslator
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterator, Set, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -9,8 +9,9 @@
:license: BSD, see LICENSE for details.
"""
if False:
# For type annotation
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -11,6 +11,7 @@
import codecs
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.io import StringOutput
@ -21,8 +22,7 @@ from sphinx.util import logging
from sphinx.util.osutil import ensuredir, os_path
from sphinx.writers.xml import XMLWriter, PseudoXMLWriter
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterator, Set # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -10,9 +10,9 @@
"""
import sys
from typing import TYPE_CHECKING
if False:
# For type annotation
if TYPE_CHECKING:
from typing import List # NOQA

View File

@ -19,6 +19,7 @@ import time
from collections import OrderedDict
from io import open
from os import path
from typing import TYPE_CHECKING
# try to import readline, unix specific enhancement
try:
@ -43,8 +44,7 @@ from sphinx.util.console import ( # type: ignore
from sphinx.util.osutil import ensuredir, make_filename
from sphinx.util.template import SphinxRenderer
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, List, Pattern, Union # NOQA
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
@ -533,7 +533,7 @@ Makefile to be used with sphinx-build.
parser.add_argument('--version', action='version', dest='show_version',
version='%%(prog)s %s' % __display_version__)
parser.add_argument('path', metavar='PROJECT_DIR', default='.',
parser.add_argument('path', metavar='PROJECT_DIR', default='.', nargs='?',
help='output path')
group = parser.add_argument_group('Structure options')

View File

@ -15,6 +15,7 @@ import multiprocessing
import os
import sys
import traceback
from typing import TYPE_CHECKING
from docutils.utils import SystemMessage
from six import text_type, binary_type
@ -27,8 +28,7 @@ from sphinx.util.console import red, nocolor, color_terminal # type: ignore
from sphinx.util.docutils import docutils_namespace, patch_docutils
from sphinx.util.pycompat import terminal_safe
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, IO, List, Union # NOQA

View File

@ -13,7 +13,7 @@ import re
import traceback
from collections import OrderedDict
from os import path, getenv
from typing import Any, NamedTuple, Union
from typing import TYPE_CHECKING, Any, NamedTuple, Union
from six import PY2, PY3, iteritems, string_types, binary_type, text_type, integer_types
@ -24,8 +24,7 @@ from sphinx.util.i18n import format_date
from sphinx.util.osutil import cd
from sphinx.util.pycompat import execfile_, NoneType
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterable, Iterator, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.tags import Tags # NOQA

View File

@ -10,6 +10,7 @@
"""
import re
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives, roles
@ -29,8 +30,7 @@ from sphinx.directives.patches import ( # noqa
Figure, Meta
)
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -10,6 +10,7 @@
import codecs
import sys
from difflib import unified_diff
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -21,8 +22,7 @@ from sphinx.util import logging
from sphinx.util import parselinenos
from sphinx.util.nodes import set_source_info
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA

View File

@ -7,6 +7,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
from docutils.parsers.rst.directives.admonitions import BaseAdmonition
@ -21,8 +23,7 @@ from sphinx.util.matching import patfilter
from sphinx.util.nodes import explicit_title_re, set_source_info, \
process_index_entry
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -7,6 +7,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import directives
from docutils.parsers.rst.directives import images, html, tables
@ -14,8 +16,7 @@ from docutils.parsers.rst.directives import images, html, tables
from sphinx import addnodes
from sphinx.util.nodes import set_source_info
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -11,14 +11,14 @@
"""
import copy
from typing import TYPE_CHECKING
from six import iteritems
from sphinx.errors import SphinxError
from sphinx.locale import _
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterable, List, Tuple, Type, Union # NOQA
from docutils import nodes # NOQA
from docutils.parsers.rst.states import Inliner # NOQA

View File

@ -11,6 +11,7 @@
import re
import string
from typing import TYPE_CHECKING
from docutils import nodes
@ -22,8 +23,7 @@ from sphinx.roles import XRefRole
from sphinx.util.docfields import Field, TypedField
from sphinx.util.nodes import make_refnode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterator, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -11,6 +11,7 @@
import re
from copy import deepcopy
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -28,8 +29,7 @@ from sphinx.util.nodes import make_refnode
from sphinx.util.pycompat import UnicodeMixin
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterator, List, Match, Pattern, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -21,8 +23,7 @@ from sphinx.roles import XRefRole
from sphinx.util.docfields import Field, GroupedField, TypedField
from sphinx.util.nodes import make_refnode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterator, List, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -10,6 +10,7 @@
"""
import re
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -24,8 +25,7 @@ from sphinx.util import logging
from sphinx.util.docfields import Field, GroupedField, TypedField
from sphinx.util.nodes import make_refnode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterable, Iterator, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -10,6 +10,7 @@
"""
import re
from typing import TYPE_CHECKING
from six import iteritems
@ -20,8 +21,7 @@ from sphinx.locale import l_, _
from sphinx.roles import XRefRole
from sphinx.util.nodes import make_refnode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterator, List, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -11,6 +11,7 @@
import re
import unicodedata
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -25,8 +26,7 @@ from sphinx.roles import XRefRole
from sphinx.util import ws_re, logging, docname_join
from sphinx.util.nodes import clean_astext, make_refnode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterator, List, Tuple, Type, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -18,6 +18,7 @@ import warnings
from collections import defaultdict
from copy import copy
from os import path
from typing import TYPE_CHECKING
from docutils.frontend import OptionParser
from docutils.utils import Reporter, get_source_line
@ -42,8 +43,7 @@ from sphinx.util.osutil import SEP, ensuredir
from sphinx.util.parallel import ParallelTasks, parallel_available, make_chunks
from sphinx.util.websupport import is_commentable
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Pattern, Set, Tuple, Type, Union, Generator # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA
@ -165,8 +165,8 @@ class BuildEnvironment(object):
# type: (Sphinx) -> None
self.app = app
self.doctreedir = app.doctreedir
self.srcdir = app.srcdir
self.config = app.config
self.srcdir = app.srcdir # type: unicode
self.config = app.config # type: Config
# the method of doctree versioning; see set_versioning_method
self.versioning_condition = None # type: Union[bool, Callable]
@ -183,7 +183,7 @@ class BuildEnvironment(object):
self._warnfunc = None # type: Callable
# this is to invalidate old pickles
self.version = app.registry.get_envversion(app)
self.version = app.registry.get_envversion(app) # type: Dict[unicode, unicode]
# All "docnames" here are /-separated and relative and exclude
# the source suffix.
@ -248,8 +248,8 @@ class BuildEnvironment(object):
# lineno, module, descname, content)
# these map absolute path -> (docnames, unique filename)
self.images = FilenameUniqDict()
self.dlfiles = FilenameUniqDict()
self.images = FilenameUniqDict() # type: FilenameUniqDict
self.dlfiles = FilenameUniqDict() # type: FilenameUniqDict
# the original URI for images
self.original_image_uri = {} # type: Dict[unicode, unicode]

View File

@ -9,8 +9,9 @@
:license: BSD, see LICENSE for details.
"""
if False:
# For type annotation
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -12,14 +12,14 @@ import bisect
import re
import unicodedata
from itertools import groupby
from typing import TYPE_CHECKING
from six import text_type, iteritems
from sphinx.locale import _
from sphinx.util import split_into, logging
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Pattern, List, Tuple # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from six import iteritems
@ -16,8 +18,7 @@ from sphinx import addnodes
from sphinx.util import url_re, logging
from sphinx.util.nodes import clean_astext, process_only_nodes
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -9,10 +9,11 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from six import itervalues
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, List, Set # NOQA
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA

View File

@ -12,6 +12,7 @@
import os
from glob import glob
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.utils import relative_path
@ -23,8 +24,7 @@ from sphinx.util import logging
from sphinx.util.i18n import get_image_filename_for_language, search_image_for_language
from sphinx.util.images import guess_mimetype
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, List, Set, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA

View File

@ -10,14 +10,14 @@
"""
from os import path
from typing import TYPE_CHECKING
from docutils.utils import relative_path
from sphinx.environment.collectors import EnvironmentCollector
from sphinx.util.osutil import getcwd, fs_encoding
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, Set # NOQA
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA

View File

@ -9,12 +9,13 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx import addnodes
from sphinx.environment.collectors import EnvironmentCollector
from sphinx.util import split_index_msg, logging
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, Set # NOQA
from docutils import nodes # NOQA
from sphinx.applicatin import Sphinx # NOQA

View File

@ -9,12 +9,13 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from sphinx.environment.collectors import EnvironmentCollector
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, Set # NOQA
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA

View File

@ -9,13 +9,14 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from sphinx.environment.collectors import EnvironmentCollector
from sphinx.transforms import SphinxContentsFilter
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, Set # NOQA
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from six import iteritems
@ -18,8 +20,7 @@ from sphinx.environment.collectors import EnvironmentCollector
from sphinx.transforms import SphinxContentsFilter
from sphinx.util import url_re, logging
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Set, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -10,8 +10,9 @@
:license: BSD, see LICENSE for details.
"""
if False:
# For type annotation
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Any # NOQA

View File

@ -13,14 +13,14 @@
from __future__ import print_function
from collections import OrderedDict, defaultdict
from typing import TYPE_CHECKING
from six import itervalues
from sphinx.errors import ExtensionError
from sphinx.locale import __
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, List # NOQA

View File

@ -23,6 +23,7 @@ import os
import sys
from fnmatch import fnmatch
from os import path
from typing import TYPE_CHECKING
from six import binary_type
@ -31,8 +32,7 @@ from sphinx.cmd.quickstart import EXTENSIONS
from sphinx.util import rst
from sphinx.util.osutil import FileAvoidWrite, ensuredir, walk
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, List, Tuple # NOQA
# automodule options

View File

@ -15,6 +15,7 @@ import inspect
import re
import sys
import warnings
from typing import TYPE_CHECKING
from docutils.statemachine import ViewList
from six import iteritems, itervalues, text_type, class_types, string_types
@ -34,13 +35,13 @@ from sphinx.util.inspect import Signature, isdescriptor, safe_getmembers, \
safe_getattr, object_description, is_builtin_class_method, \
isenumattribute, isclassmethod, isstaticmethod, getdoc
if False:
# For type annotation
if TYPE_CHECKING:
from types import ModuleType # NOQA
from typing import Any, Callable, Dict, Iterator, List, Sequence, Set, Tuple, Type, Union # NOQA
from docutils import nodes # NOQA
from docutils.utils import Reporter # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.ext.autodoc.directive import DocumenterBridge # NOQA
logger = logging.getLogger(__name__)
@ -281,7 +282,7 @@ class Documenter(object):
def __init__(self, directive, name, indent=u''):
# type: (DocumenterBridge, unicode, unicode) -> None
self.directive = directive
self.env = directive.env
self.env = directive.env # type: BuildEnvironment
self.options = directive.genopt
self.name = name
self.indent = indent
@ -745,7 +746,7 @@ class Documenter(object):
# where the attribute documentation would actually be found in.
# This is used for situations where you have a module that collects the
# functions and classes of internal submodules.
self.real_modname = real_modname or self.get_real_modname()
self.real_modname = real_modname or self.get_real_modname() # type: str
# try to also get a source code analyzer for attribute docs
try:

View File

@ -7,6 +7,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import ViewList
@ -17,8 +19,7 @@ from sphinx.util import logging
from sphinx.util.docutils import switch_source_input
from sphinx.util.nodes import nested_parse_with_titles
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Set, Type # NOQA
from docutils.statemachine import State, StateMachine, StringList # NOQA
from docutils.utils import Reporter # NOQA

View File

@ -15,14 +15,14 @@ import traceback
import warnings
from collections import namedtuple
from types import FunctionType, MethodType, ModuleType
from typing import TYPE_CHECKING
from six import PY2
from sphinx.util import logging
from sphinx.util.inspect import isenumclass, safe_getattr
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Generator, List, Optional # NOQA
logger = logging.getLogger(__name__)

View File

@ -11,14 +11,14 @@
import typing
import warnings
from typing import TYPE_CHECKING
from six import StringIO, string_types
from sphinx.deprecation import RemovedInSphinx20Warning
from sphinx.util.inspect import object_description
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Tuple # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from sphinx.util import logging
@ -22,7 +24,7 @@ if False:
logger = logging.getLogger(__name__)
if False:
if TYPE_CHECKING:
# For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -59,6 +59,7 @@ import posixpath
import re
import sys
from types import ModuleType
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -75,8 +76,7 @@ from sphinx.ext.autodoc.importer import import_module
from sphinx.pycode import ModuleAnalyzer, PycodeError
from sphinx.util import import_object, rst, logging
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple, Type, Union # NOQA
from docutils.utils import Inliner # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -25,6 +25,7 @@ import os
import pydoc
import re
import sys
from typing import TYPE_CHECKING
from jinja2 import FileSystemLoader, TemplateNotFound
from jinja2.sandbox import SandboxedEnvironment
@ -38,8 +39,7 @@ from sphinx.util.inspect import safe_getattr
from sphinx.util.osutil import ensuredir
from sphinx.util.rst import escape as rst_escape
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Tuple, List # NOQA
from jinja2 import BaseLoader # NOQA
from sphinx import addnodes # NOQA

View File

@ -14,6 +14,7 @@ import glob
import inspect
import re
from os import path
from typing import TYPE_CHECKING
from six import iteritems
from six.moves import cPickle as pickle
@ -23,8 +24,7 @@ from sphinx.builders import Builder
from sphinx.util import logging
from sphinx.util.inspect import safe_getattr
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, IO, List, Pattern, Set, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -17,6 +17,7 @@ import re
import sys
import time
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -32,8 +33,7 @@ from sphinx.util.console import bold # type: ignore
from sphinx.util.nodes import set_source_info
from sphinx.util.osutil import fs_encoding
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Sequence, Set, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -16,6 +16,7 @@ import re
from hashlib import sha1
from os import path
from subprocess import Popen, PIPE
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -29,8 +30,7 @@ from sphinx.util import logging
from sphinx.util.i18n import search_image_for_language
from sphinx.util.osutil import ensuredir, ENOENT, EPIPE, EINVAL
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -20,14 +20,15 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive
import sphinx
from sphinx.util.nodes import set_source_info
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -9,6 +9,7 @@
:license: BSD, see LICENSE for details.
"""
import subprocess
from typing import TYPE_CHECKING
from sphinx.errors import ExtensionError
from sphinx.locale import __
@ -16,8 +17,7 @@ from sphinx.transforms.post_transforms.images import ImageConverter
from sphinx.util import logging
from sphinx.util.osutil import ENOENT, EPIPE, EINVAL
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -17,6 +17,7 @@ import tempfile
from hashlib import sha1
from os import path
from subprocess import Popen, PIPE
from typing import TYPE_CHECKING
from docutils import nodes
from six import text_type
@ -31,8 +32,7 @@ from sphinx.util.osutil import ensuredir, ENOENT, cd
from sphinx.util.png import read_png_depth, write_png_depth
from sphinx.util.pycompat import sys_encoding
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -40,6 +40,7 @@ import inspect
import re
import sys
from hashlib import md5
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@ -52,8 +53,7 @@ from sphinx.ext.graphviz import render_dot_html, render_dot_latex, \
from sphinx.pycode import ModuleAnalyzer
from sphinx.util import force_decode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple, Dict, Optional # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -31,6 +31,7 @@ import posixpath
import sys
import time
from os import path
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.utils import relative_path
@ -43,8 +44,7 @@ from sphinx.locale import _
from sphinx.util import requests, logging
from sphinx.util.inventory import InventoryFile
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, IO, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
import sphinx
@ -16,8 +18,7 @@ from sphinx import addnodes
from sphinx.errors import SphinxError
from sphinx.locale import _
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Set # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes, utils
from docutils.nodes import make_id
from docutils.parsers.rst import Directive, directives
@ -20,8 +22,7 @@ from sphinx.roles import XRefRole
from sphinx.util import logging
from sphinx.util.nodes import make_refnode, set_source_info
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterable, List, Tuple # NOQA
from docutils.parsers.rst.states import Inliner # NOQA
from docutils.writers.html4css1 import Writer # NOQA

View File

@ -10,6 +10,7 @@
"""
import sys
from typing import TYPE_CHECKING
from six import PY2, iteritems
@ -17,8 +18,7 @@ import sphinx
from sphinx.application import Sphinx
from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List # NOQA

View File

@ -15,6 +15,7 @@ import collections
import inspect
import re
from functools import partial
from typing import TYPE_CHECKING
from six import string_types, u
from six.moves import range
@ -22,8 +23,7 @@ from six.moves import range
from sphinx.ext.napoleon.iterators import modify_iter
from sphinx.util.pycompat import UnicodeMixin
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config as SphinxConfig # NOQA

View File

@ -12,9 +12,9 @@
"""
import collections
from typing import TYPE_CHECKING
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Iterable # NOQA

View File

@ -18,6 +18,7 @@ import tempfile
from hashlib import sha1
from os import path
from subprocess import Popen, PIPE
from typing import TYPE_CHECKING
from docutils import nodes
from six import text_type
@ -31,8 +32,7 @@ from sphinx.util.osutil import ensuredir, ENOENT, cd
from sphinx.util.png import read_png_depth, write_png_depth
from sphinx.util.pycompat import sys_encoding
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.ext.mathbase import math as math_node, displaymath # NOQA

View File

@ -12,6 +12,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
@ -24,8 +26,7 @@ from sphinx.util import logging
from sphinx.util.nodes import set_source_info
from sphinx.util.texescape import tex_escape_map
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterable, List # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -10,6 +10,7 @@
"""
import traceback
from typing import TYPE_CHECKING
from docutils import nodes
from six import iteritems, text_type
@ -21,8 +22,7 @@ from sphinx.pycode import ModuleAnalyzer
from sphinx.util import get_full_modname, logging, status_iterator
from sphinx.util.nodes import make_refnode
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, Iterable, Iterator, Set, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -9,14 +9,15 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from six import iteritems
from sphinx.errors import VersionRequirementError
from sphinx.locale import __
from sphinx.util import logging
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from pygments import highlight
from pygments.filters import ErrorToken
from pygments.formatters import HtmlFormatter, LatexFormatter
@ -26,8 +28,7 @@ from sphinx.util import logging
from sphinx.util.pycompat import htmlescape
from sphinx.util.texescape import tex_hl_escape_map_new
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict # NOQA
from pygments.formatter import Formatter # NOQA

View File

@ -10,6 +10,7 @@
"""
import codecs
import re
from typing import TYPE_CHECKING
from docutils.core import Publisher
from docutils.io import FileInput, NullOutput
@ -33,8 +34,7 @@ from sphinx.transforms.i18n import (
from sphinx.util import logging
from sphinx.util.docutils import LoggingReporter
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple, Union # NOQA
from docutils import nodes # NOQA
from docutils.io import Input # NOQA
@ -305,7 +305,7 @@ def read_doc(app, env, filename):
source_class=SphinxDummySourceClass,
destination=NullOutput())
pub.set_components(None, 'restructuredtext', None)
pub.process_programmatic_settings(None, env.settings, None)
pub.process_programmatic_settings(None, env.settings, None) # type: ignore
pub.set_source(source, filename)
pub.publish()
return pub.document

View File

@ -11,7 +11,7 @@
from os import path
from pprint import pformat
from typing import Any, Callable, Iterator, Tuple # NOQA
from typing import TYPE_CHECKING, Any, Callable, Iterator, Tuple # NOQA
from jinja2 import FileSystemLoader, BaseLoader, TemplateNotFound, \
contextfunction
@ -22,8 +22,7 @@ from six import string_types
from sphinx.application import TemplateBridge
from sphinx.util.osutil import mtimes_of_files
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, List, Iterator, Tuple, Union # NOQA
from jinja2.environment import Environment # NOQA
from sphinx.builders import Builder # NOQA

View File

@ -10,12 +10,12 @@
"""
import gettext
from typing import TYPE_CHECKING
from six import PY3, text_type
from six.moves import UserString
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterator, List, Tuple # NOQA

View File

@ -20,14 +20,14 @@ import os
import subprocess
import sys
from os import path
from typing import TYPE_CHECKING
import sphinx
from sphinx import cmdline
from sphinx.util.console import color_terminal, nocolor, bold, blue # type: ignore
from sphinx.util.osutil import cd, rmtree
if False:
# For type annotation
if TYPE_CHECKING:
from typing import List # NOQA
proj_name = os.getenv('SPHINXPROJ', '<project>')

View File

@ -9,14 +9,15 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
import docutils.parsers
import docutils.parsers.rst
from docutils.parsers.rst import states
from docutils.statemachine import StringList
from docutils.transforms.universal import SmartQuotes
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Type # NOQA
from docutils import nodes # NOQA
from docutils.transforms import Transform # NOQA

View File

@ -10,14 +10,15 @@
"""
from __future__ import print_function
from typing import TYPE_CHECKING
from six import iteritems, BytesIO, StringIO
from sphinx.errors import PycodeError
from sphinx.pycode.parser import Parser
from sphinx.util import get_module_source, detect_encoding
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, IO, List, Tuple # NOQA

View File

@ -15,11 +15,11 @@ import re
import tokenize
from token import NAME, NEWLINE, INDENT, DEDENT, NUMBER, OP, STRING
from tokenize import COMMENT, NL
from typing import TYPE_CHECKING
from six import PY2, text_type
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, IO, List, Tuple # NOQA
comment_re = re.compile(u'^\\s*#: ?(.*)\r?\n?$')

View File

@ -12,6 +12,7 @@ from __future__ import print_function
import traceback
import warnings
from typing import TYPE_CHECKING
from pkg_resources import iter_entry_points
from six import iteritems, itervalues
@ -28,8 +29,7 @@ from sphinx.util import logging
from sphinx.util.console import bold # type: ignore
from sphinx.util.docutils import directive_helper
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterator, List, Type, Union # NOQA
from docutils import nodes # NOQA
from docutils.io import Input # NOQA

View File

@ -10,6 +10,7 @@
"""
import re
from typing import TYPE_CHECKING
from docutils import nodes, utils
from six import iteritems
@ -21,8 +22,7 @@ from sphinx.util import ws_re
from sphinx.util.nodes import split_explicit_title, process_index_entry, \
set_role_source_info
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple, Type # NOQA
from docutils.parsers.rst.states import Inliner # NOQA
from sphinx.application import Sphinx # NOQA

View File

@ -10,6 +10,7 @@
"""
import re
from os import path
from typing import TYPE_CHECKING
from six import iteritems, itervalues, text_type, string_types
from six.moves import cPickle as pickle
@ -21,8 +22,7 @@ from sphinx.util import jsdump, rpartition
from sphinx.util.pycompat import htmlescape
from sphinx.search.jssplitter import splitter_code
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, IO, Iterable, List, Tuple, Type, Set # NOQA
from docutils import nodes # NOQA
from sphinx.environment import BuildEnvironment # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,11 +9,12 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage
from sphinx.util.stemmer import get_stemmer
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict # NOQA
english_stopwords = set(u"""

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -20,6 +20,7 @@
import os
import re
import sys
from typing import TYPE_CHECKING
from six import iteritems, PY3
@ -39,8 +40,7 @@ from sphinx.errors import SphinxError, ExtensionError
from sphinx.search import SearchLanguage
from sphinx.util import import_object
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Any, Dict, List # NOQA

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,6 +9,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer

View File

@ -9,12 +9,13 @@
:license: BSD, see LICENSE for details.
"""
from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage
import snowballstemmer
if False:
# For type annotation
if TYPE_CHECKING:
from typing import Dict, Set # NOQA
js_stemmer = u"""

Some files were not shown because too many files have changed in this diff Show More