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/transforms | |
parent | 859b5fcea71f8d4f46e0ef3726e68df54bfbc3b7 (diff) | |
parent | 64fb1e56242d93ee0e8c317ab9e7643242b99658 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/transforms')
-rw-r--r-- | sphinx/transforms/__init__.py | 3 | ||||
-rw-r--r-- | sphinx/transforms/compact_bullet_list.py | 3 | ||||
-rw-r--r-- | sphinx/transforms/i18n.py | 11 | ||||
-rw-r--r-- | sphinx/transforms/post_transforms/__init__.py | 4 | ||||
-rw-r--r-- | sphinx/transforms/post_transforms/images.py | 6 |
5 files changed, 10 insertions, 17 deletions
diff --git a/sphinx/transforms/__init__.py b/sphinx/transforms/__init__.py index 43ea64de8..1dbdb94f7 100644 --- a/sphinx/transforms/__init__.py +++ b/sphinx/transforms/__init__.py @@ -23,8 +23,7 @@ from docutils.utils.smartquotes import smartchars from sphinx import addnodes from sphinx.config import Config from sphinx.locale import _, __ -from sphinx.util import docutils -from sphinx.util import logging +from sphinx.util import docutils, logging from sphinx.util.docutils import new_document from sphinx.util.i18n import format_date from sphinx.util.nodes import NodeMatcher, apply_source_workaround, is_smartquotable diff --git a/sphinx/transforms/compact_bullet_list.py b/sphinx/transforms/compact_bullet_list.py index 1cde3b1f0..e30efa92b 100644 --- a/sphinx/transforms/compact_bullet_list.py +++ b/sphinx/transforms/compact_bullet_list.py @@ -8,8 +8,7 @@ :license: BSD, see LICENSE for details. """ -from typing import Any, Dict, List -from typing import cast +from typing import Any, Dict, List, cast from docutils import nodes from docutils.nodes import Node diff --git a/sphinx/transforms/i18n.py b/sphinx/transforms/i18n.py index b016ba418..8dc72f8da 100644 --- a/sphinx/transforms/i18n.py +++ b/sphinx/transforms/i18n.py @@ -21,14 +21,13 @@ from docutils.utils import relative_path from sphinx import addnodes from sphinx.config import Config from sphinx.domains.std import make_glossary_term, split_term_classifiers -from sphinx.locale import __, init as init_locale +from sphinx.locale import __ +from sphinx.locale import init as init_locale from sphinx.transforms import SphinxTransform -from sphinx.util import split_index_msg, logging, get_filetype +from sphinx.util import get_filetype, logging, split_index_msg from sphinx.util.i18n import docname_to_domain -from sphinx.util.nodes import ( - LITERAL_TYPE_NODES, IMAGE_TYPE_NODES, NodeMatcher, - extract_messages, is_pending_meta, traverse_translatable_index, -) +from sphinx.util.nodes import (IMAGE_TYPE_NODES, LITERAL_TYPE_NODES, NodeMatcher, + extract_messages, is_pending_meta, traverse_translatable_index) if TYPE_CHECKING: from sphinx.application import Sphinx diff --git a/sphinx/transforms/post_transforms/__init__.py b/sphinx/transforms/post_transforms/__init__.py index 6633d6434..f9feab2a6 100644 --- a/sphinx/transforms/post_transforms/__init__.py +++ b/sphinx/transforms/post_transforms/__init__.py @@ -8,8 +8,7 @@ :license: BSD, see LICENSE for details. """ -from typing import Any, Dict, List, Tuple, Type -from typing import cast +from typing import Any, Dict, List, Tuple, Type, cast from docutils import nodes from docutils.nodes import Element @@ -25,7 +24,6 @@ from sphinx.util import logging from sphinx.util.docutils import SphinxTranslator from sphinx.util.nodes import process_only_nodes - logger = logging.getLogger(__name__) diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py index 949c09dde..4865aa615 100644 --- a/sphinx/transforms/post_transforms/images.py +++ b/sphinx/transforms/post_transforms/images.py @@ -18,12 +18,10 @@ from docutils import nodes from sphinx.application import Sphinx from sphinx.locale import __ from sphinx.transforms import SphinxTransform -from sphinx.util import epoch_to_rfc1123, rfc1123_to_epoch, sha1 -from sphinx.util import logging, requests -from sphinx.util.images import guess_mimetype, get_image_extension, parse_data_uri +from sphinx.util import epoch_to_rfc1123, logging, requests, rfc1123_to_epoch, sha1 +from sphinx.util.images import get_image_extension, guess_mimetype, parse_data_uri from sphinx.util.osutil import ensuredir, movefile - logger = logging.getLogger(__name__) MAX_FILENAME_LEN = 32 |