Skip to content

Remove Redundant f-string

Sourcery refactoring id: remove-redundant-fstring

Description

If an f-string has no replacements turn it into a regular string.

Before

print(f"Why, oh why am I an f-string")

After

print("Why, oh why am I an f-string")

Explanation

Is not necessary to use an f-string that has no replacements so let's keep it simple and just use a constant string.