UP031 not violated for variables, only literal values #10187
Closed
Description
UP031 (printf-string-formatting
, suggests using str.format
instead of percent formatting) doesn't trigger when using a variable and not a literal value.
Even using the example from the docs -
value = 1
print("%s" % value) # seems to be OK
print("%s" % 1) # violating UP031
I've tried this out in the rust playground as well (here's an example) with version 0.3.0, selecting all UP
rules