diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2022-06-16 19:50:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 19:50:01 +0100 |
commit | 6ef22d261303ec07890305b300135c34952ca327 (patch) | |
tree | c126f78d478bdc289f3f796fcd22ccfdcd09a715 /sphinx/cmd/quickstart.py | |
parent | 881f66c5573cec1b3333868effb10cec5c62c7b4 (diff) | |
download | sphinx-git-6ef22d261303ec07890305b300135c34952ca327.tar.gz |
Increase static typing strictness (#10530)
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r-- | sphinx/cmd/quickstart.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 5e9c2b470..1509ee7fd 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -7,11 +7,14 @@ import sys import time from collections import OrderedDict from os import path -from typing import Any, Callable, Dict, List, Union +from typing import TYPE_CHECKING, Any, Callable, Dict, List, Union # try to import readline, unix specific enhancement try: import readline + if TYPE_CHECKING and sys.platform == "win32": # always false, for type checking + raise ImportError + if readline.__doc__ and 'libedit' in readline.__doc__: readline.parse_and_bind("bind ^I rl_complete") USE_LIBEDIT = True |