Merge pull request #5817 from jdufresne/inventory-typing

Define a common Inventory type for reuse across modules
This commit is contained in:
Takeshi KOMIYA authored and GitHub committed 2018-12-17 20:53:12 +09:00
commit 1ef7b1a080
3 files changed
+4 -7

No files matched your search

+1 -3
View File
@@ -32,7 +32,6 @@ from urllib.parse import urlsplit, urlunsplit
from docutils import nodes
from docutils.utils import relative_path
from six import text_type
import sphinx
from sphinx.builders.html import INVENTORY_FILENAME
@@ -46,8 +45,7 @@ if False:
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
Inventory = Dict[text_type, Dict[text_type, Tuple[text_type, text_type, text_type, text_type]]] # NOQA
from sphinx.util.typing import Inventory # NOQA
logger = logging.getLogger(__name__)
+1 -4
View File
@@ -11,8 +11,6 @@ import os
import re
import zlib
from six import text_type
from sphinx.util import logging
if False:
@@ -20,8 +18,7 @@ if False:
from typing import Callable, Dict, IO, Iterator, Tuple # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
Inventory = Dict[text_type, Dict[text_type, Tuple[text_type, text_type, text_type, text_type]]] # NOQA
from sphinx.util.typing import Inventory # NOQA
BUFSIZE = 16 * 1024
+2
View File
@@ -27,3 +27,5 @@ RoleFunction = Callable[[text_type, text_type, text_type, int, Inliner, Dict, Li
# title getter functions for enumerable nodes (see sphinx.domains.std)
TitleGetter = Callable[[nodes.Node], text_type]
Inventory = Dict[str, Dict[str, Tuple[str, str, str, str]]]