Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-15 18:05:35 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-15 18:05:35 +0300
commit712c20a3d91cd80247c5625782ba8ada2b2c2378 (patch)
treed151c391d9bc18aa2ceffa455efa658bafc1ec29 /sphinx/config.py
parent5a03cac7d369ea71e1414792df62668ca5fd8190 (diff)
parentcb5fab5db90c2177ede34af876b19e58b9dc1263 (diff)
Merge branch '2.0'
Diffstat (limited to 'sphinx/config.py')
-rw-r--r--sphinx/config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/config.py b/sphinx/config.py
index 691cdac11..c12841acb 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -186,6 +186,12 @@ class Config:
defvalue = self.values[name][0]
if self.values[name][2] == Any:
return value
+ elif type(defvalue) is bool or self.values[name][2] == [bool]:
+ if value == '0':
+ # given falsy string from command line option
+ return False
+ else:
+ return bool(value)
elif isinstance(defvalue, dict):
raise ValueError(__('cannot override dictionary config setting %r, '
'ignoring (use %r to set individual elements)') %