summaryrefslogtreecommitdiff
path: root/sphinx/cmd/quickstart.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-06-16 21:46:54 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-06-16 21:46:54 +0100
commit7e38d2dad808e6f3995d7266a78390a8ccc37781 (patch)
treedec683a1a86f1e20cac6892c6993ce8523d73179 /sphinx/cmd/quickstart.py
parentce31e1c0c7b32f6be93186e0fef076ef65ff0b05 (diff)
parent6ab15a047cf9d3957aa884f5aa5b20e98f039f6e (diff)
downloadsphinx-git-7e38d2dad808e6f3995d7266a78390a8ccc37781.tar.gz
Merge branch '5.x'
# Conflicts: # .github/workflows/builddoc.yml # .github/workflows/lint.yml # sphinx/registry.py
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r--sphinx/cmd/quickstart.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py
index 47853c90d..610052ea9 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