summaryrefslogtreecommitdiff
path: root/sphinx/ext/intersphinx.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/intersphinx.py')
-rw-r--r--sphinx/ext/intersphinx.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py
index 4c8941134..246d69626 100644
--- a/sphinx/ext/intersphinx.py
+++ b/sphinx/ext/intersphinx.py
@@ -47,7 +47,7 @@ from sphinx.util import requests, logging
if False:
# For type annotation
- from typing import Any, Callable, Dict, IO, Iterator, Tuple, Union # NOQA
+ from typing import Any, Callable, Dict, IO, Iterator, List, Tuple, Union # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.config import Config # NOQA
from sphinx.environment import BuildEnvironment # NOQA
@@ -173,6 +173,8 @@ def read_inventory(f, uri, join, bufsize=16 * 1024):
return read_inventory_v1(f, uri, join)
elif line == '# Sphinx inventory version 2':
return read_inventory_v2(f, uri, join, bufsize=bufsize)
+ else:
+ raise ValueError('unknown inventory header: %s' % line)
def _strip_basic_auth(url):