summaryrefslogtreecommitdiff
path: root/sphinx/config.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-12-20 21:33:57 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-12-20 21:33:57 +0900
commita7a77d154ba659c94b06d8b07028f9ae996412e0 (patch)
tree459ea70c63b048a3e23c86a093c6c655e513e34f /sphinx/config.py
parentd9280e253ad849ac5f843d2900352a76dcfae000 (diff)
parenta7e10c1d36007650b5e3948021d4aa90d78127d4 (diff)
downloadsphinx-git-a7a77d154ba659c94b06d8b07028f9ae996412e0.tar.gz
Merge branch '3.x'
Diffstat (limited to 'sphinx/config.py')
-rw-r--r--sphinx/config.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sphinx/config.py b/sphinx/config.py
index 005bc812f..02c70cea0 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -173,6 +173,14 @@ class Config:
defvalue = self.values[name][0]
if self.values[name][2] == Any:
return value
+ elif self.values[name][2] == {bool, str}:
+ if value == '0':
+ # given falsy string from command line option
+ return False
+ elif value == '1':
+ return True
+ else:
+ return value
elif type(defvalue) is bool or self.values[name][2] == [bool]:
if value == '0':
# given falsy string from command line option