From ee3d0b0712cd9159ad0bc76c4b3853f28c89fcd2 Mon Sep 17 00:00:00 2001 From: Alex Prabhat Bara <50404684+alexprabhat99@users.noreply.github.com> Date: Wed, 4 Dec 2024 00:55:51 +0530 Subject: [PATCH] detect missing arguments in logging format strings --- pylint/checkers/logging.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py index d057c78ecb..c18cea8617 100644 --- a/pylint/checkers/logging.py +++ b/pylint/checkers/logging.py @@ -326,10 +326,6 @@ def _check_format_string(self, node: nodes.Call, format_arg: Literal[0, 1]) -> N format_arg: Index of the format string in the node arguments. """ num_args = _count_supplied_tokens(node.args[format_arg + 1 :]) - if not num_args: - # If no args were supplied the string is not interpolated and can contain - # formatting characters - it's used verbatim. Don't check any further. - return format_string = node.args[format_arg].value required_num_args = 0