raising-format-tuple / W0715ΒΆ
Message emitted:
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
Problematic code:
raise RuntimeError("This looks wrong %s %s", ("a", "b")) # [raising-format-tuple]
Correct code:
raise RuntimeError("This looks wrong %s %s" % ("a", "b"))
Created by the exceptions checker.