Add sphinx.util.typing:unicode to help mypy-3 migration

This commit is contained in:
Takeshi KOMIYA 2018-11-24 20:14:43 +09:00
parent 95dffb2af6
commit 3c99d00605
153 changed files with 173 additions and 9 deletions

View File

@ -18,6 +18,7 @@ from sphinx.deprecation import RemovedInSphinx30Warning
if False:
# For type annotation
from typing import List, Sequence # NOQA
from sphinx.util.typing import unicode # NOQA
class translatable:

View File

@ -60,7 +60,7 @@ if False:
from sphinx.extension import Extension # NOQA
from sphinx.roles import XRefRole # NOQA
from sphinx.theming import Theme # NOQA
from sphinx.util.typing import RoleFunction, TitleGetter # NOQA
from sphinx.util.typing import RoleFunction, TitleGetter, unicode # NOQA
builtin_extensions = (
'sphinx.builders.applehelp',

View File

@ -47,6 +47,7 @@ if False:
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.i18n import CatalogInfo # NOQA
from sphinx.util.tags import Tags # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -39,6 +39,7 @@ if False:
# For type annotation
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -31,6 +31,7 @@ if False:
# For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -27,6 +27,7 @@ if False:
# For type annotation
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -36,6 +36,7 @@ if False:
# For type annotation
from typing import Dict, List # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -18,6 +18,7 @@ if False:
from typing import Any, Dict, Set # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
class DummyBuilder(Builder):

View File

@ -28,6 +28,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -35,8 +35,9 @@ if False:
# For type annotation
from typing import Any, DefaultDict, Dict, Iterable, List, Set, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.util.i18n import CatalogInfo # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.i18n import CatalogInfo # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -60,6 +60,7 @@ if False:
from sphinx.config import Config # NOQA
from sphinx.domains import Domain, Index, IndexEntry # NOQA
from sphinx.util.tags import Tags # NOQA
from sphinx.util.typing import unicode # NOQA
# Experimental HTML5 Writer
if is_html5_writer_available():
@ -675,7 +676,7 @@ class StandaloneHTMLBuilder(Builder):
doctree.settings = self.docsettings
self.secnumbers = self.env.toc_secnumbers.get(docname, {})
self.fignumbers = self.env.toc_fignumbers.get(docname, {}) # type: Dict[unicode, Dict[unicode, Tuple[int, ...]]] # NOQA
self.fignumbers = self.env.toc_fignumbers.get(docname, {})
self.imgpath = relative_uri(self.get_target_uri(docname), '_images')
self.dlpath = relative_uri(self.get_target_uri(docname), '_downloads') # type: unicode
self.current_docname = docname

View File

@ -29,6 +29,7 @@ if False:
# For type annotation
from typing import Any, Dict, IO, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -45,6 +45,7 @@ if False:
from typing import Any, Dict, Iterable, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.util.typing import unicode # NOQA
XINDY_LANG_OPTIONS = {

View File

@ -21,6 +21,7 @@ from sphinx.util.nodes import NodeMatcher
if False:
# For type annotation
from typing import Any, Dict, List, Set, Tuple, Union # NOQA
from sphinx.util.typing import unicode # NOQA
URI_SCHEMES = ('mailto:', 'http:', 'https:', 'ftp:')

View File

@ -33,6 +33,7 @@ if False:
from typing import Any, Dict, List, Set, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.requests.requests import Response # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -28,6 +28,7 @@ if False:
# For type annotation
from typing import Any, Dict, List, Set, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -31,6 +31,7 @@ if False:
# For type annotation
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -35,6 +35,7 @@ if False:
# For type annotation
from sphinx.application import Sphinx # NOQA
from typing import Any, Dict, Iterable, List, Tuple, Union # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -24,6 +24,7 @@ if False:
from typing import Any, Dict, Iterator, Set, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -13,6 +13,7 @@ if False:
# For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
def setup(app):

View File

@ -25,6 +25,7 @@ if False:
# For type annotation
from typing import Any, Dict, Iterator, Set # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -29,6 +29,7 @@ from sphinx.util.osutil import cd, rmtree
if False:
# For type annotation
from typing import List # NOQA
from sphinx.util.typing import unicode # NOQA
BUILDERS = [

View File

@ -51,6 +51,7 @@ from sphinx.util.template import SphinxRenderer
if False:
# For type annotation
from typing import Any, Callable, Dict, List, Pattern, Union # NOQA
from sphinx.util.typing import unicode # NOQA
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)

View File

@ -33,6 +33,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.tags import Tags # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -15,6 +15,7 @@ if False:
# For type annotation
# note: Don't use typing.TYPE_CHECK here (for py27 and py34).
from typing import Any, Dict, Type # NOQA
from sphinx.util.typing import unicode # NOQA
class RemovedInSphinx30Warning(PendingDeprecationWarning):

View File

@ -36,6 +36,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
# RE to strip backslash escapes

View File

@ -29,6 +29,7 @@ if False:
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -28,6 +28,7 @@ if False:
# For type annotation
from typing import Any, Dict, Generator, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
glob_re = re.compile(r'.*[*?\[].*')

View File

@ -20,6 +20,7 @@ if False:
# For type annotation
from typing import Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
class Figure(images.Figure):

View File

@ -24,7 +24,7 @@ if False:
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.roles import XRefRole # NOQA
from sphinx.util.typing import RoleFunction # NOQA
from sphinx.util.typing import RoleFunction, unicode # NOQA
class ObjType:

View File

@ -28,6 +28,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
# RE to split at word boundaries

View File

@ -27,6 +27,7 @@ if False:
from typing import Any, Dict, List # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
versionlabels = {

View File

@ -36,6 +36,7 @@ if False:
from sphinx.builders import Builder # NOQA
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -29,6 +29,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class JSObject(ObjectDescription):

View File

@ -25,6 +25,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -31,6 +31,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -25,6 +25,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
dir_sig_re = re.compile(r'\.\. (.+?)::(.*)$')

View File

@ -36,7 +36,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import RoleFunction # NOQA
from sphinx.util.typing import RoleFunction, unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -40,6 +40,7 @@ if False:
from sphinx.config import Config # NOQA
from sphinx.domains import Domain # NOQA
from sphinx.project import Project # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -12,6 +12,7 @@
if False:
# For type annotation
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class ImageAdapter:

View File

@ -23,6 +23,7 @@ if False:
from typing import Any, Dict, Pattern, List, Tuple # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -22,6 +22,7 @@ if False:
from typing import Any, Dict, List # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -15,6 +15,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class EnvironmentCollector:

View File

@ -29,6 +29,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -23,6 +23,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class DependenciesCollector(EnvironmentCollector):

View File

@ -21,6 +21,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.applicatin import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -19,6 +19,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class MetadataCollector(EnvironmentCollector):

View File

@ -20,6 +20,7 @@ if False:
from docutils import nodes # NOQA
from sphinx.sphinx import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class TitleCollector(EnvironmentCollector):

View File

@ -24,6 +24,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -13,6 +13,7 @@
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
class SphinxError(Exception):

View File

@ -20,6 +20,7 @@ from sphinx.locale import __
if False:
# For type annotation
from typing import Any, Callable, Dict, List # NOQA
from sphinx.util.typing import unicode # NOQA
# List of all known core events. Maps name to arguments description.

View File

@ -35,6 +35,7 @@ from sphinx.util.osutil import FileAvoidWrite, ensuredir
if False:
# For type annotation
from typing import Any, List, Tuple # NOQA
from sphinx.util.typing import unicode # NOQA
# automodule options
if 'SPHINX_APIDOC_OPTIONS' in os.environ:

View File

@ -43,6 +43,7 @@ if False:
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.ext.autodoc.directive import DocumenterBridge # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -24,6 +24,7 @@ if False:
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.ext.autodoc import Documenter # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -22,6 +22,7 @@ from sphinx.util.inspect import isenumclass, safe_getattr
if False:
# For type annotation
from typing import Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -27,6 +27,7 @@ if False:
# For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
def register_sections_as_label(app, document):

View File

@ -87,6 +87,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.ext.autodoc import Documenter # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -48,6 +48,7 @@ if False:
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.ext.autodoc import Documenter # NOQA
from sphinx.util.typing import unicode # NOQA
class DummyApplication:

View File

@ -26,6 +26,7 @@ if False:
# For type annotation
from typing import Any, Callable, Dict, IO, List, Pattern, Set, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -38,6 +38,7 @@ if False:
# For type annotation
from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Sequence, Set, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -35,6 +35,7 @@ if False:
from docutils.parsers.rst.states import Inliner # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import RoleFunction # NOQA
from sphinx.util.typing import unicode # NOQA
def make_link_role(base_url, prefix):

View File

@ -18,6 +18,7 @@ if False:
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
def create_nojekyll(app, env):

View File

@ -35,6 +35,7 @@ if False:
from docutils.parsers.rst import Directive # NOQA
from typing import Any, Dict, List, Tuple # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -30,6 +30,7 @@ if False:
# For type annotation
from typing import Any, Dict, List # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
class ifconfig(nodes.Element):

View File

@ -21,6 +21,7 @@ if False:
# For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -36,6 +36,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.config import Config # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -55,6 +55,7 @@ if False:
from typing import Any, Dict, List, Tuple, Dict, Optional # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
module_sig_re = re.compile(r'''^(?:([\w.]*)\.)? # module names

View File

@ -49,6 +49,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
Inventory = Dict[text_type, Dict[text_type, Tuple[text_type, text_type, text_type, text_type]]] # NOQA

View File

@ -23,6 +23,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.writers.html import HTMLTranslator # NOQA
from sphinx.util.typing import unicode # NOQA
def html_visit_math(self, node):

View File

@ -20,6 +20,7 @@ if False:
# For type annotation
from typing import Any, Dict, Set # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
class LinkcodeError(SphinxError):

View File

@ -26,6 +26,7 @@ if False:
from typing import Any, Callable, List, Tuple # NOQA
from docutils.writers.html4css1 import Writer # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
class MathDirective(MathDirectiveBase):

View File

@ -26,6 +26,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.writers.html import HTMLTranslator # NOQA
from sphinx.util.typing import unicode # NOQA
def html_visit_math(self, node):

View File

@ -16,6 +16,7 @@ from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring
if False:
# For type annotation
from typing import Any, Dict, List # NOQA
from sphinx.util.typing import unicode # NOQA
class Config:

View File

@ -25,6 +25,7 @@ if False:
from typing import Any, Dict, List, Tuple, Type, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config as SphinxConfig # NOQA
from sphinx.util.typing import unicode # NOQA
_directive_regex = re.compile(r'\.\. \S+::')

View File

@ -29,6 +29,7 @@ if False:
from typing import Any, Dict, Iterable, List # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -29,6 +29,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -18,6 +18,7 @@ if False:
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -34,6 +34,7 @@ if False:
# For type annotation
from typing import Any, Dict # NOQA
from pygments.formatter import Formatter # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -49,6 +49,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
docinfo_re = re.compile(':\\w+:.*?')

View File

@ -28,6 +28,7 @@ if False:
from jinja2.environment import Environment # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.theming import Theme # NOQA
from sphinx.util.typing import unicode # NOQA
def _tobool(val):

View File

@ -23,6 +23,7 @@ from sphinx.deprecation import RemovedInSphinx30Warning
if False:
# For type annotation
from typing import Any, Callable, Dict, Iterator, List, Tuple # NOQA
from sphinx.util.typing import unicode # NOQA
class _TranslationProxy(UserString):

View File

@ -21,6 +21,7 @@ if False:
from docutils import nodes # NOQA
from docutils.transforms import Transform # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
class Parser(docutils.parsers.Parser):

View File

@ -20,6 +20,7 @@ from sphinx.util.osutil import SEP, relpath
if TYPE_CHECKING:
from typing import Dict, List, Set # NOQA
from sphinx.util.typing import unicode # NOQA
logger = logging.getLogger(__name__)
EXCLUDE_PATHS = ['**/_sources', '.#*', '**/.#*', '*.lproj/**'] # type: List[unicode]

View File

@ -23,6 +23,7 @@ from sphinx.util import get_module_source, detect_encoding
if False:
# For type annotation
from typing import Any, Dict, IO, List, Tuple # NOQA
from sphinx.util.typing import unicode # NOQA
class ModuleAnalyzer:

View File

@ -22,6 +22,7 @@ from six import text_type
if False:
# For type annotation
from typing import Any, Dict, IO, List, Tuple # NOQA
from sphinx.util.typing import unicode # NOQA
comment_re = re.compile(u'^\\s*#: ?(.*)\r?\n?$')
indent_re = re.compile(u'^\\s*$')
@ -143,7 +144,7 @@ class TokenProcessor:
# type: (List[unicode]) -> None
lines = iter(buffers)
self.buffers = buffers
self.tokens = tokenize.generate_tokens(lambda: next(lines)) # type: ignore # NOQA
self.tokens = tokenize.generate_tokens(lambda: next(lines)) # type: ignore
self.current = None # type: Token
self.previous = None # type: Token

View File

@ -43,7 +43,7 @@ if False:
from sphinx.domains import Domain, Index # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.ext.autodoc import Documenter # NOQA
from sphinx.util.typing import RoleFunction, TitleGetter # NOQA
from sphinx.util.typing import RoleFunction, TitleGetter, unicode # NOQA
logger = logging.getLogger(__name__)

View File

@ -26,7 +26,7 @@ if False:
from docutils.parsers.rst.states import Inliner # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import RoleFunction # NOQA
from sphinx.util.typing import RoleFunction, unicode # NOQA
generic_docroles = {

View File

@ -26,6 +26,7 @@ if False:
from typing import Any, Dict, IO, Iterable, List, Tuple, Type, Set # NOQA
from docutils import nodes # NOQA
from sphinx.environment import BuildEnvironment # NOQA
from sphinx.util.typing import unicode # NOQA
class SearchLanguage:

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
danish_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
german_stopwords = parse_stop_word(u'''

View File

@ -15,6 +15,7 @@ from sphinx.util.stemmer import get_stemmer
if False:
# For type annotation
from typing import Dict # NOQA
from sphinx.util.typing import unicode # NOQA
english_stopwords = set(u"""
a and are as at

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
spanish_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
finnish_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
french_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
hungarian_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
italian_stopwords = parse_stop_word(u'''

View File

@ -42,6 +42,7 @@ from sphinx.util import import_object
if False:
# For type annotation
from typing import Any, Dict, List # NOQA
from sphinx.util.typing import unicode # NOQA
class BaseSplitter:

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
dutch_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
norwegian_stopwords = parse_stop_word(u'''

View File

@ -16,6 +16,7 @@ import snowballstemmer
if False:
# For type annotation
from typing import Any # NOQA
from sphinx.util.typing import unicode # NOQA
portuguese_stopwords = parse_stop_word(u'''

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