summaryrefslogtreecommitdiff
path: root/sphinx/util/inventory.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 11:30:01 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 19:36:41 +0900
commit941bf951acda5a27b6ff5adef6678c974b6615ba (patch)
tree21ebcfdeac2d917763b1bb155c08e9da9d4a548f /sphinx/util/inventory.py
parent3b87df07ff0e875564684cf278427e31d7d4548d (diff)
downloadsphinx-git-941bf951acda5a27b6ff5adef6678c974b6615ba.tar.gz
Hello TYPE_CHECKING!
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