mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5817 from jdufresne/inventory-typing
Define a common Inventory type for reuse across modules
This commit is contained in:
commit
1ef7b1a080
@ -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__)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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]]]
|
||||
|
Loading…
Reference in New Issue
Block a user