diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-07 14:15:05 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-15 21:14:28 +0100 |
commit | 3aa504542b370fe230176ab3e5840941e2a6de74 (patch) | |
tree | f3ab2906c66276663546fcd87c003dc19d3f46e7 | |
parent | 01ee9180948d98455459440150622d53e0456987 (diff) | |
download | pylint-git-3aa504542b370fe230176ab3e5840941e2a6de74.tar.gz |
Fix all E741 ambiguous variable name 'l'
-rw-r--r-- | pylint/config/man_help_formatter.py | 2 | ||||
-rw-r--r-- | tests/test_import_graph.py | 27 |
2 files changed, 14 insertions, 15 deletions
diff --git a/pylint/config/man_help_formatter.py b/pylint/config/man_help_formatter.py index 4c4607c18..66aa1cb9c 100644 --- a/pylint/config/man_help_formatter.py +++ b/pylint/config/man_help_formatter.py @@ -28,7 +28,7 @@ class _ManHelpFormatter(optparse.HelpFormatter): optstring = self.format_option_strings(option) if option.help: help_text = self.expand_default(option) - help_string = " ".join([l.strip() for l in help_text.splitlines()]) + help_string = " ".join([line.strip() for line in help_text.splitlines()]) help_string = help_string.replace("\\", "\\\\") help_string = help_string.replace("[current:", "[default:") else: diff --git a/tests/test_import_graph.py b/tests/test_import_graph.py index a57e2c880..048982277 100644 --- a/tests/test_import_graph.py +++ b/tests/test_import_graph.py @@ -58,9 +58,9 @@ URL="." node[shape="box"] @pytest.fixture def linter(): - l = PyLinter(reporter=testutils.GenericTestReporter()) - initialize(l) - return l + pylinter = PyLinter(reporter=testutils.GenericTestReporter()) + initialize(pylinter) + return pylinter @pytest.fixture @@ -75,18 +75,17 @@ def remove_files(): @pytest.mark.usefixtures("remove_files") def test_checker_dep_graphs(linter): - l = linter - l.global_set_option("persistent", False) - l.global_set_option("reports", True) - l.global_set_option("enable", "imports") - l.global_set_option("import-graph", "import.dot") - l.global_set_option("ext-import-graph", "ext_import.dot") - l.global_set_option("int-import-graph", "int_import.dot") - l.global_set_option("int-import-graph", "int_import.dot") + linter.global_set_option("persistent", False) + linter.global_set_option("reports", True) + linter.global_set_option("enable", "imports") + linter.global_set_option("import-graph", "import.dot") + linter.global_set_option("ext-import-graph", "ext_import.dot") + linter.global_set_option("int-import-graph", "int_import.dot") + linter.global_set_option("int-import-graph", "int_import.dot") # ignore this file causing spurious MemoryError w/ some python version (>=2.3?) - l.global_set_option("ignore", ("func_unknown_encoding.py",)) - l.check("input") - l.generate_reports() + linter.global_set_option("ignore", ("func_unknown_encoding.py",)) + linter.check("input") + linter.generate_reports() assert exists("import.dot") assert exists("ext_import.dot") assert exists("int_import.dot") |