summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-02-06 11:15:18 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2023-02-06 19:52:35 +0100
commit20fe9ac69efc6648e66f6e584ee86c0a19412d97 (patch)
treeb7d00f1f2eb7beab35a0dfbe042fe4f99a64d544
parentd4d1313417879534462861be2ecf831a57f1a7a6 (diff)
downloadpylint-git-20fe9ac69efc6648e66f6e584ee86c0a19412d97.tar.gz
[ruff] Fix E741 Ambiguous variable name: 'l'
-rw-r--r--pylint/checkers/logging.py2
-rw-r--r--tests/checkers/unittest_utils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py
index 1cfa33c0f..f7568a3a4 100644
--- a/pylint/checkers/logging.py
+++ b/pylint/checkers/logging.py
@@ -345,7 +345,7 @@ class LoggingChecker(checkers.BaseChecker):
) = utils.parse_format_method_string(format_string)
keyword_args_cnt = len(
- {k for k, l in keyword_arguments if not isinstance(k, int)}
+ {k for k, _ in keyword_arguments if not isinstance(k, int)}
)
required_num_args = (
keyword_args_cnt + implicit_pos_args + explicit_pos_args
diff --git a/tests/checkers/unittest_utils.py b/tests/checkers/unittest_utils.py
index 08b9c188d..2f0bf0e08 100644
--- a/tests/checkers/unittest_utils.py
+++ b/tests/checkers/unittest_utils.py
@@ -164,7 +164,7 @@ def test_parse_format_method_string() -> None:
]
for fmt, count in samples:
keys, num_args, pos_args = utils.parse_format_method_string(fmt)
- keyword_args = len({k for k, l in keys if not isinstance(k, int)})
+ keyword_args = len({k for k, _ in keys if not isinstance(k, int)})
assert keyword_args + num_args + pos_args == count