Skip to content

Files

Latest commit

 

History

History
24 lines (15 loc) · 431 Bytes

f-string-without-interpolation.md

File metadata and controls

24 lines (15 loc) · 431 Bytes

Pattern: Use of f-string without interpolation

Issue: -

Description

This check is emitted whenever Pylint detects the use of an f-string without having any interpolated values in it, which means that the f-string can be a normal string.

Example of incorrect code:

print(f"ERROR")

Example of correct code:

import math

VALUE = 1

print(f"some value {VALUE}")
print(f'pi: {math.pi:.3f}')