summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Sadhwani <tushar.sadhwani000@gmail.com>2021-10-30 01:15:52 +0530
committerGitHub <noreply@github.com>2021-10-29 21:45:52 +0200
commit76a7553066130a7dbf4d10922b2530161b2ec5b0 (patch)
tree83859664ce32f86b56a2ff7cca92dc14d35241cc
parent8c7e2fae6fee28944764e643e65e729a58a5473c (diff)
downloadpylint-git-76a7553066130a7dbf4d10922b2530161b2ec5b0.tar.gz
Unify all `<y or n>` metavars in option's help (#5229)
* Unify all `<y or n>` metavars
-rw-r--r--CONTRIBUTORS.txt2
-rw-r--r--doc/how_tos/custom_checkers.rst2
-rw-r--r--doc/tutorial.rst2
-rw-r--r--pylint/checkers/base.py2
-rw-r--r--pylint/checkers/format.py4
-rw-r--r--pylint/checkers/imports.py4
-rw-r--r--pylint/checkers/spelling.py2
-rw-r--r--pylint/checkers/strings.py4
-rw-r--r--pylint/checkers/typecheck.py6
-rw-r--r--pylint/checkers/variables.py4
-rw-r--r--pylint/extensions/typing.py2
-rw-r--r--pylint/lint/pylinter.py10
-rw-r--r--pylint/pyreverse/main.py2
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' : '<y_or_n>',
+ 'default': False, 'type': 'yn', 'metavar' : '<y or n>',
'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=<msg-ids>
Reports:
- --reports=<y_or_n>
+ --reports=<y or n>
--output-format=<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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"help": "Tells whether we should check for unused import in "
"__init__ files.",
},
@@ -697,7 +697,7 @@ class VariablesChecker(BaseChecker):
{
"default": True,
"type": "yn",
- "metavar": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"level": 1,
"help": "Pickle collected data for later comparisons.",
},
@@ -276,7 +276,7 @@ class PyLinter(
{
"default": False,
"type": "yn",
- "metavar": "<y_or_n>",
+ "metavar": "<y or n>",
"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": "<y_or_n>",
+ "metavar": "<y or n>",
"short": "s",
"group": "Reports",
"help": "Activate the evaluation score.",
@@ -409,7 +409,7 @@ class PyLinter(
"unsafe-load-any-extension",
{
"type": "yn",
- "metavar": "<yn>",
+ "metavar": "<y or n>",
"default": False,
"hide": True,
"help": (
@@ -465,7 +465,7 @@ class PyLinter(
"suggestion-mode",
{
"type": "yn",
- "metavar": "<yn>",
+ "metavar": "<y or n>",
"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="<y or n>",
help="include module name in representation of classes",
),
),