prefer-fstring-over-concat
Prefer f-strings for short human-readable interpolation when they make the result clearer.
Why
For prose-like strings, f-strings keep interpolated values and surrounding text visible together.
Fix
Use one f-string when it preserves the required conversion and operator semantics. Preserve an explicit str(value) conversion as {value!s} and repr(value) as {value!r} when those conversion semantics matter. Retain required custom concatenation or formatting behavior; a str annotation alone does not prove equivalence.
Examples
def greeting(name: str) -> str: return "Hello, " + name + "!"def greeting(name: str) -> str: return f"Hello, {name}!"