Skip to content

Commit 2fc6315

Browse files
committed
ENH: CLI env runs with typing.TYPE_CHECKING = True
Fixes #460
1 parent 7e53887 commit 2fc6315

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pdoc/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import re
1212
import subprocess
1313
import sys
14+
import typing
1415
import warnings
1516
from contextlib import contextmanager
1617
from functools import lru_cache
@@ -453,6 +454,8 @@ def main(_args=None):
453454
global args
454455
args = _args or parser.parse_args()
455456

457+
typing.TYPE_CHECKING = True # type: ignore # Set this for subsequent module imports
458+
456459
# If warnings not externally managed, show deprecation warnings
457460
if not sys.warnoptions:
458461
warnings.simplefilter("once", DeprecationWarning)

0 commit comments

Comments
 (0)