This commit is contained in:
Takeshi KOMIYA 2020-11-12 02:52:50 +09:00
parent 279e547860
commit b718aef7d8
34 changed files with 24 additions and 57 deletions

View File

@ -19,7 +19,6 @@ from subprocess import PIPE
from .deprecation import RemovedInNextVersionWarning
# by default, all DeprecationWarning under sphinx package will be emit.
# Users can avoid this by using environment variable: PYTHONWARNINGS=
if 'PYTHONWARNINGS' not in os.environ:

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
from typing import Any, Dict, List, Sequence
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List, Sequence
from docutils import nodes
from docutils.nodes import Element

View File

@ -11,8 +11,7 @@
import pickle
import time
from os import path
from typing import Any, Dict, Iterable, List, Sequence, Set, Tuple, Type, Union
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Sequence, Set, Tuple, Type, Union
from docutils import nodes
from docutils.nodes import Node

View File

@ -13,7 +13,7 @@ from collections import OrderedDict, defaultdict
from datetime import datetime, timedelta, tzinfo
from os import getenv, path, walk
from time import time
from typing import Any, DefaultDict, Dict, Iterable, Generator, List, Set, Tuple, Union
from typing import Any, DefaultDict, Dict, Generator, Iterable, List, Set, Tuple, Union
from uuid import uuid4
from docutils import nodes

View File

@ -47,7 +47,6 @@ from sphinx.util.osutil import copyfile, ensuredir, movefile, os_path, relative_
from sphinx.util.tags import Tags
from sphinx.writers.html import HTMLTranslator, HTMLWriter
# HTML5 Writer is available or not
if is_html5_writer_available():
from sphinx.writers.html5 import HTML5Translator

View File

@ -23,7 +23,6 @@ from sphinx.util import logging
from sphinx.util.osutil import ensuredir, os_path
from sphinx.writers.xml import PseudoXMLWriter, XMLWriter
logger = logging.getLogger(__name__)

View File

@ -8,8 +8,7 @@
import sys
from difflib import unified_diff
from typing import Any, Dict, List, Tuple
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List, Tuple
from docutils import nodes
from docutils.nodes import Element, Node

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
from typing import Any, Dict, Iterable, List, Tuple
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple
from docutils import nodes
from docutils.nodes import Node, system_message

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
from typing import Any, Dict, Iterable, List, Tuple
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple
from docutils import nodes
from docutils.nodes import Element, Node, make_id, system_message

View File

@ -40,7 +40,6 @@ from sphinx.util.inspect import signature_from_str
from sphinx.util.nodes import make_id, make_refnode
from sphinx.util.typing import TextlikeNode
logger = logging.getLogger(__name__)

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
from typing import Dict, List, Set
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Dict, List, Set
from docutils import nodes

View File

@ -22,7 +22,6 @@ from sphinx.locale import __
from sphinx.transforms import SphinxContentsFilter
from sphinx.util import logging, url_re
N = TypeVar('N')
logger = logging.getLogger(__name__)

View File

@ -12,8 +12,7 @@
from collections import defaultdict
from operator import attrgetter
from typing import Any, Callable, Dict, List, NamedTuple, Tuple, Type
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Tuple, Type
from sphinx.errors import ExtensionError, SphinxError
from sphinx.locale import __

View File

@ -21,7 +21,6 @@ from sphinx.util import logging
from sphinx.util.docutils import SphinxDirective, switch_source_input
from sphinx.util.nodes import nested_parse_with_titles
logger = logging.getLogger(__name__)

View File

@ -87,7 +87,6 @@ from sphinx.util.docutils import (NullReporter, SphinxDirective, SphinxRole, new
from sphinx.util.matching import Matcher
from sphinx.writers.html import HTMLTranslator
logger = logging.getLogger(__name__)

View File

@ -49,7 +49,6 @@ from sphinx.util.inspect import safe_getattr
from sphinx.util.osutil import ensuredir
from sphinx.util.template import SphinxTemplateLoader
logger = logging.getLogger(__name__)

View File

@ -15,8 +15,8 @@ import sys
import time
from io import StringIO
from os import path
from typing import Any, Callable, Dict, Iterable, List, Sequence, Set, Tuple, Type
from typing import TYPE_CHECKING
from typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Sequence, Set, Tuple,
Type)
from docutils import nodes
from docutils.nodes import Element, Node, TextElement

View File

@ -22,7 +22,6 @@ from sphinx.ext.napoleon.iterators import modify_iter
from sphinx.locale import _, __
from sphinx.util import logging
logger = logging.getLogger(__name__)
_directive_regex = re.compile(r'\.\. \S+::')

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
from typing import Any, Dict
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict
from sphinx.config import Config
from sphinx.errors import VersionRequirementError

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
import codecs
from typing import Any, List, Type
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, List, Type
from docutils import nodes
from docutils.core import Publisher

View File

@ -10,8 +10,7 @@
from os import path
from pprint import pformat
from typing import Any, Callable, Dict, Iterator, List, Tuple, Union
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Tuple, Union
from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound, contextfunction
from jinja2.environment import Environment

View File

@ -9,8 +9,7 @@
"""
import warnings
from typing import Any, Dict, List, Type, Union
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List, Type, Union
import docutils.parsers
import docutils.parsers.rst

View File

@ -11,8 +11,7 @@
import traceback
from importlib import import_module
from types import MethodType
from typing import Any, Callable, Dict, Iterator, List, Tuple, Type, Union
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Tuple, Type, Union
from docutils import nodes
from docutils.io import Input

View File

@ -9,8 +9,7 @@
"""
import re
from typing import Any, Dict, List, Tuple, Type
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type
from docutils import nodes, utils
from docutils.nodes import Element, Node, TextElement, system_message

View File

@ -13,8 +13,7 @@ import os
import shutil
import tempfile
from os import path
from typing import Any, Dict, List
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List
from zipfile import ZipFile
import pkg_resources

View File

@ -9,8 +9,7 @@
"""
import re
from typing import Any, Dict, Generator, List, Tuple
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Tuple
from docutils import nodes
from docutils.nodes import Element, Node, Text

View File

@ -10,8 +10,7 @@
from os import path
from textwrap import indent
from typing import Any, Dict, List, Tuple, Type, TypeVar
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar
from docutils import nodes
from docutils.io import StringInput

View File

@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
"""
from typing import Any, Dict
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict
from docutils.transforms.references import DanglingReferences

View File

@ -26,7 +26,6 @@ from typing import (IO, TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator,
Set, Tuple, Type)
from urllib.parse import parse_qsl, quote_plus, urlencode, urlsplit, urlunsplit
from sphinx.deprecation import RemovedInSphinx50Warning
from sphinx.errors import ExtensionError, FiletypeNotFoundError, SphinxParallelError
from sphinx.locale import __
@ -42,7 +41,6 @@ from sphinx.util.osutil import (SEP, copyfile, copytimes, ensuredir, make_filena
movefile, mtimes_of_files, os_path, relative_uri)
from sphinx.util.typing import PathMatcher
if TYPE_CHECKING:
from sphinx.application import Sphinx

View File

@ -9,8 +9,7 @@
"""
import sys
from typing import Any, Dict
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict
if TYPE_CHECKING:
from sphinx.application import Sphinx

View File

@ -10,8 +10,7 @@
import os
import posixpath
from typing import Callable, Dict
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Callable, Dict
from docutils.utils import relative_path

View File

@ -12,8 +12,7 @@ import os
import re
from datetime import datetime, timezone
from os import path
from typing import Callable, Generator, List, NamedTuple, Tuple, Union
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Callable, Generator, List, NamedTuple, Tuple, Union
import babel.dates
from babel.messages.mofile import write_mo

View File

@ -13,7 +13,6 @@ from typing import Any, Callable
from sphinx.deprecation import RemovedInSphinx60Warning
# ------------------------------------------------------------------------------
# Python 2/3 compatibility

View File

@ -12,8 +12,7 @@ import pickle
from itertools import product, zip_longest
from operator import itemgetter
from os import path
from typing import Any, Dict, Iterator
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, Iterator
from uuid import uuid4
from docutils.nodes import Node