diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-19 17:53:53 +0000 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-19 17:53:53 +0000 |
commit | b1cb956b40605c1fbdb85a90a9fe002a46e5cf0c (patch) | |
tree | 8c007969b2ccf7e1fa6d095d611ad33aa6f218d2 /pylint/config.py | |
parent | 1f17d18b344876d273248dfdd96af92bd17770e0 (diff) | |
download | pylint-b1cb956b40605c1fbdb85a90a9fe002a46e5cf0c.tar.gz |
Abbreviations of command line options are not supported anymore.
Using abbreviations for CLI options was never considered to be
a feature of pylint, this fact being only a side effect of using optparse.
As this was the case, using --load-plugin or other abbreviation
for --load-plugins never actually worked, while it also didn't raise
an error. Closes issue #424.
Diffstat (limited to 'pylint/config.py')
-rw-r--r-- | pylint/config.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pylint/config.py b/pylint/config.py index c9ab351..fb5c2da 100644 --- a/pylint/config.py +++ b/pylint/config.py @@ -316,6 +316,12 @@ class OptionParser(optparse.OptionParser): # Drop the last "\n", or the header if no options or option groups: return "".join(result[:-1]) + def _match_long_opt(self, opt): + """Disable abbreviations.""" + if opt not in self._long_opt: + raise optparse.BadOptionError(opt) + return opt + # pylint: disable=abstract-method; by design? class _ManHelpFormatter(optparse.HelpFormatter): |