summaryrefslogtreecommitdiff
path: root/pylint/config/option.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-04-12 12:56:42 +0200
committerGitHub <noreply@github.com>2022-04-12 12:56:42 +0200
commit03cfbf3df1d20ba1bfd445c59f18c906e8dd8a62 (patch)
treeee5c4d6fff9e1d6630b7ee31151e141df08ba4c8 /pylint/config/option.py
parent575628a8736bdd60042bc27ca0ab33fa828e199b (diff)
downloadpylint-git-03cfbf3df1d20ba1bfd445c59f18c906e8dd8a62.tar.gz
Use ``namespace`` in ``PyLinter`` and the functional config tests (#6271)
* Use callback actions in ``PyLinter`` * Turn off ``optparse`` command line parsing * No longer emit ``bad-configuration-section`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/config/option.py')
-rw-r--r--pylint/config/option.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/config/option.py b/pylint/config/option.py
index d4732348c..1bc273377 100644
--- a/pylint/config/option.py
+++ b/pylint/config/option.py
@@ -74,14 +74,14 @@ def _multiple_choice_validator(choices, name, value):
return values
-def _non_empty_string_validator(opt, _, value):
+def _non_empty_string_validator(opt, _, value): # pragma: no cover # Unused
if not value:
msg = "indent string can't be empty."
raise optparse.OptionValueError(msg)
return utils._unquote(value)
-def _multiple_choices_validating_option(opt, name, value):
+def _multiple_choices_validating_option(opt, name, value): # pragma: no cover # Unused
return _multiple_choice_validator(opt.choices, name, value)
@@ -193,7 +193,7 @@ class Option(optparse.Option):
optparse.Option.CHECK_METHODS[2] = _check_choice # type: ignore[index]
- def process(self, opt, value, values, parser):
+ def process(self, opt, value, values, parser): # pragma: no cover # Argparse
if self.callback and self.callback.__module__ == "pylint.lint.run":
return 1
# First, convert the value(s) to the right type. Howl if any