diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-07 16:14:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 16:14:11 +0200 |
commit | 3690134ea670b12fa6d729c1ad06d87dba9567ed (patch) | |
tree | badcb093019ada2f28b4d55298e1f36215e2c74d /pylint/config/callback_actions.py | |
parent | b8d369b91b49020ae6febc3c7ccc6280c625458c (diff) | |
download | pylint-git-3690134ea670b12fa6d729c1ad06d87dba9567ed.tar.gz |
Deprecate ``generate_config`` (#6222)
Diffstat (limited to 'pylint/config/callback_actions.py')
-rw-r--r-- | pylint/config/callback_actions.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pylint/config/callback_actions.py b/pylint/config/callback_actions.py index f502819b3..28c5683b4 100644 --- a/pylint/config/callback_actions.py +++ b/pylint/config/callback_actions.py @@ -9,6 +9,7 @@ import abc import argparse import sys +import warnings from pathlib import Path from typing import TYPE_CHECKING, Any, Optional, Sequence, Union @@ -235,7 +236,12 @@ class _GenerateRCFileAction(_AccessRunObjectAction): values: Union[str, Sequence[Any], None], option_string: Optional[str] = "--generate-rcfile", ) -> None: - self.run.linter.generate_config(skipsections=("COMMANDS",)) + # pylint: disable-next=fixme + # TODO: Optparse: Deprecate this function and raise a warning. + # This is (obviously) dependent on a --generate-toml-config flag. + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + self.run.linter.generate_config(skipsections=("COMMANDS",)) sys.exit(0) |