mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Do isort
This commit is contained in:
parent
279e547860
commit
b718aef7d8
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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 __
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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+::')
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -13,7 +13,6 @@ from typing import Any, Callable
|
||||
|
||||
from sphinx.deprecation import RemovedInSphinx60Warning
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Python 2/3 compatibility
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user