Wander Lairson Costa <[email protected]> writes: > Replace all instances of percent-style string formatting with > f-strings across the rvgen codebase. This modernizes the string > formatting to use Python 3.6+ features, providing clearer and more > maintainable code while improving runtime performance. > > The conversion handles all formatting cases including simple variable > substitution, multi-variable formatting, and complex format specifiers. > Dynamic width formatting is converted from "%*s" to "{var:>{width}}" > using proper alignment syntax. Template strings for generated C code > properly escape braces using double-brace syntax to produce literal > braces in the output. > > F-strings provide approximately 2x performance improvement over percent > formatting and are the recommended approach in modern Python. > > Signed-off-by: Wander Lairson Costa <[email protected]>
Reviewed-by: Nam Cao <[email protected]>
