diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-11 20:50:43 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-11 20:50:43 +0300 |
commit | 279e547860ea68e3c357f55e608afec682a1f961 (patch) | |
tree | dc08e85ab0210538e30b5b801bf9d80ab49bfb3f /sphinx/environment | |
parent | 859b5fcea71f8d4f46e0ef3726e68df54bfbc3b7 (diff) | |
parent | 64fb1e56242d93ee0e8c317ab9e7643242b99658 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/environment')
-rw-r--r-- | sphinx/environment/__init__.py | 9 | ||||
-rw-r--r-- | sphinx/environment/adapters/indexentries.py | 6 | ||||
-rw-r--r-- | sphinx/environment/adapters/toctree.py | 5 | ||||
-rw-r--r-- | sphinx/environment/collectors/asset.py | 1 | ||||
-rw-r--r-- | sphinx/environment/collectors/metadata.py | 3 | ||||
-rw-r--r-- | sphinx/environment/collectors/toctree.py | 5 |
6 files changed, 11 insertions, 18 deletions
diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py index 628c9aaf6..dd5bec6cf 100644 --- a/sphinx/environment/__init__.py +++ b/sphinx/environment/__init__.py @@ -14,8 +14,8 @@ from collections import defaultdict from copy import copy from datetime import datetime from os import path -from typing import Any, Callable, Dict, Generator, Iterator, List, Set, Tuple, Union -from typing import TYPE_CHECKING +from typing import (TYPE_CHECKING, Any, Callable, Dict, Generator, Iterator, List, Set, Tuple, + Union) from docutils import nodes from docutils.nodes import Node @@ -24,13 +24,12 @@ from sphinx import addnodes from sphinx.config import Config from sphinx.domains import Domain from sphinx.environment.adapters.toctree import TocTree -from sphinx.errors import SphinxError, BuildEnvironmentError, DocumentError, ExtensionError +from sphinx.errors import BuildEnvironmentError, DocumentError, ExtensionError, SphinxError from sphinx.events import EventManager from sphinx.locale import __ from sphinx.project import Project from sphinx.transforms import SphinxTransformer -from sphinx.util import DownloadFiles, FilenameUniqDict -from sphinx.util import logging +from sphinx.util import DownloadFiles, FilenameUniqDict, logging from sphinx.util.docutils import LoggingReporter from sphinx.util.i18n import CatalogRepository, docname_to_domain from sphinx.util.nodes import is_translatable diff --git a/sphinx/environment/adapters/indexentries.py b/sphinx/environment/adapters/indexentries.py index b13ac97c3..427024a00 100644 --- a/sphinx/environment/adapters/indexentries.py +++ b/sphinx/environment/adapters/indexentries.py @@ -11,16 +11,14 @@ import re import unicodedata from itertools import groupby -from typing import Any, Dict, Pattern, List, Tuple -from typing import cast +from typing import Any, Dict, List, Pattern, Tuple, cast from sphinx.builders import Builder from sphinx.domains.index import IndexDomain from sphinx.environment import BuildEnvironment from sphinx.errors import NoUri from sphinx.locale import _, __ -from sphinx.util import split_into, logging - +from sphinx.util import logging, split_into logger = logging.getLogger(__name__) diff --git a/sphinx/environment/adapters/toctree.py b/sphinx/environment/adapters/toctree.py index 1d3320af2..62fb1a95a 100644 --- a/sphinx/environment/adapters/toctree.py +++ b/sphinx/environment/adapters/toctree.py @@ -8,15 +8,14 @@ :license: BSD, see LICENSE for details. """ -from typing import Any, Iterable, List -from typing import TYPE_CHECKING, cast +from typing import TYPE_CHECKING, Any, Iterable, List, cast from docutils import nodes from docutils.nodes import Element, Node from sphinx import addnodes from sphinx.locale import __ -from sphinx.util import url_re, logging +from sphinx.util import logging, url_re from sphinx.util.matching import Matcher from sphinx.util.nodes import clean_astext, process_only_nodes diff --git a/sphinx/environment/collectors/asset.py b/sphinx/environment/collectors/asset.py index 3da2a6e4b..7f913ebbc 100644 --- a/sphinx/environment/collectors/asset.py +++ b/sphinx/environment/collectors/asset.py @@ -26,7 +26,6 @@ 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 - logger = logging.getLogger(__name__) diff --git a/sphinx/environment/collectors/metadata.py b/sphinx/environment/collectors/metadata.py index bcff1f273..ef872759b 100644 --- a/sphinx/environment/collectors/metadata.py +++ b/sphinx/environment/collectors/metadata.py @@ -8,8 +8,7 @@ :license: BSD, see LICENSE for details. """ -from typing import Any, Dict, List, Set -from typing import cast +from typing import Any, Dict, List, Set, cast from docutils import nodes diff --git a/sphinx/environment/collectors/toctree.py b/sphinx/environment/collectors/toctree.py index d17f7090e..995685d75 100644 --- a/sphinx/environment/collectors/toctree.py +++ b/sphinx/environment/collectors/toctree.py @@ -8,8 +8,7 @@ :license: BSD, see LICENSE for details. """ -from typing import Any, Dict, List, Set, Tuple, Type, TypeVar -from typing import cast +from typing import Any, Dict, List, Set, Tuple, Type, TypeVar, cast from docutils import nodes from docutils.nodes import Element, Node @@ -21,7 +20,7 @@ from sphinx.environment.adapters.toctree import TocTree from sphinx.environment.collectors import EnvironmentCollector from sphinx.locale import __ from sphinx.transforms import SphinxContentsFilter -from sphinx.util import url_re, logging +from sphinx.util import logging, url_re N = TypeVar('N') |