Skip to content

Commit 308a2c9

Browse files
committed
add import guard to sphinx
1 parent abf341b commit 308a2c9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
import os
99
import sys
10+
from typing import TYPE_CHECKING
1011

11-
from sphinx.application import Sphinx
12+
if TYPE_CHECKING:
13+
from sphinx.application import Sphinx
1214

1315
# Add the src directory to the path so we can import the package
1416
sys.path.insert(0, os.path.abspath("../src"))

0 commit comments

Comments
 (0)