diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-12 12:59:10 +0200 |
---|---|---|
committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-12 13:10:40 +0200 |
commit | 5c112dd133d954f6334602d88d14a6fe546c35e3 (patch) | |
tree | 343634eeb3fb0367c57fbdc3e64202c85a88af46 /pylint/utils | |
parent | 03cfbf3df1d20ba1bfd445c59f18c906e8dd8a62 (diff) | |
download | pylint-git-5c112dd133d954f6334602d88d14a6fe546c35e3.tar.gz |
Remove last use of ``config`` in ``PyLinter``
Diffstat (limited to 'pylint/utils')
-rw-r--r-- | pylint/utils/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pylint/utils/utils.py b/pylint/utils/utils.py index b1ec3cf3d..ae565371b 100644 --- a/pylint/utils/utils.py +++ b/pylint/utils/utils.py @@ -264,6 +264,15 @@ def get_global_option( until the given *option* will be found. If the option wasn't found, the *default* value will be returned. """ + + # # pylint: disable-next=fixme + # # TODO: Optparse: Potentially deprecate this. + # Firstly, try on the namespace object + try: + return getattr(checker.linter.namespace, option.replace("-", "_")) + except AttributeError: + pass + # First, try in the given checker's config. # After that, look in the options providers. |