W0715 raising-format-tuple¶
- Message
'Exception arguments suggest string formatting might be intended'
- Description
Used when passing multiple arguments to an exception constructor, the first of them a string literal containing what appears to be placeholders intended for formatting
Example¶
def example():
raise RuntimeError("This looks wrong %s %s", ("a", "b"))
def example2():
raise RuntimeError("Maybe you meant this %s %s" % ("a", "b"))
2:4: W0715: Exception arguments suggest string formatting might be intended
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.