summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--doc/whatsnew/2.12.rst2
-rw-r--r--pylint/config/option.py2
3 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1fb2b9a88..253a35fae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -158,6 +158,8 @@ Release date: TBA
Closes #5208
+* Make yn validator case insensitive, to allow for ``True`` and ``False`` in config files.
+
What's New in Pylint 2.11.2?
============================
diff --git a/doc/whatsnew/2.12.rst b/doc/whatsnew/2.12.rst
index 76b08846f..919371046 100644
--- a/doc/whatsnew/2.12.rst
+++ b/doc/whatsnew/2.12.rst
@@ -156,3 +156,5 @@ Other Changes
have functioning shared semaphore implementation.
Closes #5216
+
+* Make yn validator case insensitive, to allow for ``True`` and ``False`` in config files.
diff --git a/pylint/config/option.py b/pylint/config/option.py
index 7b3e3b1b1..706b7a4af 100644
--- a/pylint/config/option.py
+++ b/pylint/config/option.py
@@ -50,6 +50,8 @@ def _choice_validator(choices, name, value):
def _yn_validator(opt, _, value):
if isinstance(value, int):
return bool(value)
+ if isinstance(value, str):
+ value = value.lower()
if value in ("y", "yes", "true"):
return True
if value in ("n", "no", "false"):