Replace % formatting with f-string
ProprietaryReplace "..." % (...) expressions with f-strings (Python 3.6+). Only converts %s and %r specifiers where the format string is a literal and the conversion is safe. A single operand that is not a tuple literal must have a type that resolves to a non-tuple, such as str or int, since a tuple would be spread over the specifiers. An expression with a comment inside it is left alone, since the f-string would drop it.
org. openrewrite. python. migrate. ReplacePercentFormatWithFStringmod run . --recipe= org. openrewrite. python. migrate. ReplacePercentFormatWithFStringInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.