summaryrefslogtreecommitdiff
path: root/sphinx/util/inventory.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/inventory.py')
-rw-r--r--sphinx/util/inventory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/inventory.py b/sphinx/util/inventory.py
index 9b647ccac..3e5cf19b2 100644
--- a/sphinx/util/inventory.py
+++ b/sphinx/util/inventory.py
@@ -11,6 +11,7 @@ import os
import re
import zlib
from typing import Callable, IO, Iterator
+from typing import TYPE_CHECKING
from sphinx.util import logging
from sphinx.util.typing import Inventory
@@ -19,8 +20,7 @@ from sphinx.util.typing import Inventory
BUFSIZE = 16 * 1024
logger = logging.getLogger(__name__)
-if False:
- # For type annotation
+if TYPE_CHECKING:
from sphinx.builders import Builder
from sphinx.environment import BuildEnvironment