--- Logging error ---
Traceback (most recent call last):
File "XXXX/.pyenv/versions/3.8.1/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "XXXX/.pyenv/versions/3.8.1/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "XXXX/.pyenv/versions/3.8.1/lib/python3.8/logging/__init__.py", line 664, in format
record.message = record.getMessage()
File "XXXX/.pyenv/versions/3.8.1/lib/python3.8/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
ValueError: incomplete format
Call stack:
File "XXXXX/logging_tester.py", line 119, in <module>
c.check({})
File "XXXXX/logging_tester.py", line 116, in check
self.log.debug("Squid version is unknown: %", 'abc')
Message: 'my message: %'
Arguments: ('abc',)
or
TypeError: not all arguments converted during string formatting
Hi, first, thanks for amazing this linter!
We got some cases of
incomplete format
issues due to oversight. It could be useful to detect them too.Examples:
Can lead to lead to
ValueError
andTypeError
:or