E1205 logging-too-many-args¶
- Message
'Too many arguments for logging format string'
- Description
Used when a logging format string is given too many arguments.
Example¶
In the following example, the format string given for debug
only has one
variable, but the call is given two additional arguments.
import logging
a = 1
b = 2
logging.debug("State: %d", a, b)
4:0: E1205: Too many arguments for logging format string
This will cause an exception, but only when the lazy formatting of the log message is executed (ie. if the log level is set so that the message will be emitted).
Running Pylint locally? In your CI?
There is a better way! Run PyCodeQual & get Pylint findings with history, diffs and statistics.
Click here to find out more.