mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Define a common Inventory type for reuse across modules
This commit is contained in:
@@ -33,7 +33,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
|
||||
@@ -47,8 +46,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__)
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ import os
|
||||
import re
|
||||
import zlib
|
||||
|
||||
from six import text_type
|
||||
|
||||
from sphinx.util import logging
|
||||
|
||||
if False:
|
||||
@@ -21,8 +19,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
|
||||
|
||||
@@ -28,3 +28,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]]]
|
||||
|
||||
Reference in New Issue
Block a user