summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-09-05 10:57:03 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-10-26 06:48:45 +0200
commitb6d154e8bbc32c3d71a1bfceed467c8614e0e4f1 (patch)
tree0a551987b08122c34f08c9414d24bbf2843a2d96
parent157091a014fb9a160682d250ef68c1114a505d4f (diff)
downloadpylint-git-b6d154e8bbc32c3d71a1bfceed467c8614e0e4f1.tar.gz
Put the environnement help directly where it makes sense
-rw-r--r--pylint/config/__init__.py11
-rw-r--r--pylint/lint/run.py17
2 files changed, 15 insertions, 13 deletions
diff --git a/pylint/config/__init__.py b/pylint/config/__init__.py
index 6bf30d3b4..44e4131e7 100644
--- a/pylint/config/__init__.py
+++ b/pylint/config/__init__.py
@@ -150,14 +150,3 @@ def find_pylintrc():
PYLINTRC = find_pylintrc()
-
-ENV_HELP = """
-The following environment variables are used:
- * PYLINTHOME
- Path to the directory where persistent data for the run will be stored. If
-not found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working
-directory).
- * PYLINTRC
- Path to the configuration file. See the documentation for the method used
-to search for configuration file.
-"""
diff --git a/pylint/lint/run.py b/pylint/lint/run.py
index 1555400cd..95be1a6f7 100644
--- a/pylint/lint/run.py
+++ b/pylint/lint/run.py
@@ -5,7 +5,7 @@ import os
import sys
import warnings
-from pylint import __pkginfo__, config, extensions, interfaces
+from pylint import __pkginfo__, extensions, interfaces
from pylint.constants import full_version
from pylint.lint.pylinter import PyLinter
from pylint.lint.utils import ArgumentPreprocessingError, preprocess_options
@@ -269,7 +269,20 @@ group are mutually exclusive.",
# load command line plugins
linter.load_plugin_modules(self._plugins)
# add some help section
- linter.add_help_section("Environment variables", config.ENV_HELP, level=1)
+ linter.add_help_section(
+ "Environment variables",
+ """
+The following environment variables are used:
+ * PYLINTHOME
+ Path to the directory where persistent data for the run will be stored. If
+not found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working
+directory).
+ * PYLINTRC
+ Path to the configuration file. See the documentation for the method used
+to search for configuration file.
+""",
+ level=1,
+ )
linter.add_help_section(
"Output",
"Using the default text output, the message format is : \n"