From 76a7553066130a7dbf4d10922b2530161b2ec5b0 Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Sat, 30 Oct 2021 01:15:52 +0530 Subject: Unify all `` metavars in option's help (#5229) * Unify all `` metavars --- CONTRIBUTORS.txt | 2 ++ doc/how_tos/custom_checkers.rst | 2 +- doc/tutorial.rst | 2 +- pylint/checkers/base.py | 2 +- pylint/checkers/format.py | 4 ++-- pylint/checkers/imports.py | 4 ++-- pylint/checkers/spelling.py | 2 +- pylint/checkers/strings.py | 4 ++-- pylint/checkers/typecheck.py | 6 +++--- pylint/checkers/variables.py | 4 ++-- pylint/extensions/typing.py | 2 +- pylint/lint/pylinter.py | 10 +++++----- pylint/pyreverse/main.py | 2 +- 13 files changed, 24 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index a23f73b66..b4bab0120 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -568,3 +568,5 @@ contributors: * Mike Fiedler (miketheman): contributor * Takahide Nojima: contributor + +* Tushar Sadhwani (tusharsadhwani): contributor diff --git a/doc/how_tos/custom_checkers.rst b/doc/how_tos/custom_checkers.rst index 7a454c4f5..6cded973b 100644 --- a/doc/how_tos/custom_checkers.rst +++ b/doc/how_tos/custom_checkers.rst @@ -58,7 +58,7 @@ Firstly we will need to fill in some required boilerplate: ( 'ignore-ints', { - 'default': False, 'type': 'yn', 'metavar' : '', + 'default': False, 'type': 'yn', 'metavar' : '', 'help': 'Allow returning non-unique integers', } ), diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 6eb46bfc9..b7ff5559c 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -62,7 +62,7 @@ A couple of the options that we'll focus on here are: :: Messages control: --disable= Reports: - --reports= + --reports= --output-format= If you need more detail, you can also ask for an even longer help message, diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index d6a59f38b..510b2cdcf 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -1816,7 +1816,7 @@ class NameChecker(_BasicChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": "Include a hint for the correct naming format with invalid-name.", }, ), diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py index 7817dba72..d0e4b9914 100644 --- a/pylint/checkers/format.py +++ b/pylint/checkers/format.py @@ -270,7 +270,7 @@ class FormatChecker(BaseTokenChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": ( "Allow the body of an if to be on the same " "line as the test if there is no else." @@ -282,7 +282,7 @@ class FormatChecker(BaseTokenChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": ( "Allow the body of a class to be on the same " "line as the declaration if body contains " diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py index 3e0b39d26..65080af15 100644 --- a/pylint/checkers/imports.py +++ b/pylint/checkers/imports.py @@ -405,7 +405,7 @@ class ImportsChecker(DeprecatedMixin, BaseChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": "Analyse import fallback blocks. This can be used to " "support both Python 2 and 3 compatible code, which " "means that the block might have code that exists " @@ -418,7 +418,7 @@ class ImportsChecker(DeprecatedMixin, BaseChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": "Allow wildcard imports from modules that define __all__.", }, ), diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py index b26b5edd6..082e21183 100644 --- a/pylint/checkers/spelling.py +++ b/pylint/checkers/spelling.py @@ -259,7 +259,7 @@ class SpellingChecker(BaseTokenChecker): { "default": "n", "type": "yn", - "metavar": "", + "metavar": "", "help": "Tells whether to store unknown words to the " "private dictionary (see the " "--spelling-private-dict-file option) instead of " diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py index cc3ecce89..7df0d6052 100644 --- a/pylint/checkers/strings.py +++ b/pylint/checkers/strings.py @@ -681,7 +681,7 @@ class StringConstantChecker(BaseTokenChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": "This flag controls whether the " "implicit-str-concat should generate a warning " "on implicit string concatenation in sequences defined over " @@ -693,7 +693,7 @@ class StringConstantChecker(BaseTokenChecker): { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "help": "This flag controls whether inconsistent-quotes generates a " "warning when the character used as a quote delimiter is used " "inconsistently within a module.", diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index 549cd7f4c..e2af03e55 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -777,7 +777,7 @@ class TypeChecker(BaseChecker): { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "help": "This flag controls whether pylint should warn about " "no-member and similar checks whenever an opaque object " "is returned when inferring. The inference can return " @@ -802,7 +802,7 @@ class TypeChecker(BaseChecker): { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "help": "Tells whether missing members accessed in mixin " "class should be ignored. A class is considered mixin if its name matches " "the mixin-class-rgx option.", @@ -813,7 +813,7 @@ class TypeChecker(BaseChecker): { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "help": "Tells whether to warn about missing members when the owner " "of the attribute is inferred to be None.", }, diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py index 360b0af55..3ae5957c7 100644 --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -629,7 +629,7 @@ class VariablesChecker(BaseChecker): { "default": 0, "type": "yn", - "metavar": "", + "metavar": "", "help": "Tells whether we should check for unused import in " "__init__ files.", }, @@ -697,7 +697,7 @@ class VariablesChecker(BaseChecker): { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "help": "Tells whether unused global variables should be treated as a violation.", }, ), diff --git a/pylint/extensions/typing.py b/pylint/extensions/typing.py index aacd4429a..92282b983 100644 --- a/pylint/extensions/typing.py +++ b/pylint/extensions/typing.py @@ -108,7 +108,7 @@ class TypingChecker(BaseChecker): { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "help": ( "Set to ``no`` if the app / library does **NOT** need to " "support runtime introspection of type annotations. " diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py index ede27d1e8..4c9756696 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -240,7 +240,7 @@ class PyLinter( { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "level": 1, "help": "Pickle collected data for later comparisons.", }, @@ -276,7 +276,7 @@ class PyLinter( { "default": False, "type": "yn", - "metavar": "", + "metavar": "", "short": "r", "group": "Reports", "help": "Tells whether to display a full report or only the " @@ -306,7 +306,7 @@ class PyLinter( { "default": True, "type": "yn", - "metavar": "", + "metavar": "", "short": "s", "group": "Reports", "help": "Activate the evaluation score.", @@ -409,7 +409,7 @@ class PyLinter( "unsafe-load-any-extension", { "type": "yn", - "metavar": "", + "metavar": "", "default": False, "hide": True, "help": ( @@ -465,7 +465,7 @@ class PyLinter( "suggestion-mode", { "type": "yn", - "metavar": "", + "metavar": "", "default": True, "help": ( "When enabled, pylint would attempt to guess common " diff --git a/pylint/pyreverse/main.py b/pylint/pyreverse/main.py index 55e416e3b..2e3b56bef 100644 --- a/pylint/pyreverse/main.py +++ b/pylint/pyreverse/main.py @@ -116,7 +116,7 @@ OPTIONS = ( short="m", default=None, type="yn", - metavar="[yn]", + metavar="", help="include module name in representation of classes", ), ), -- cgit v1.2.1