Closed ghost closed 2 years ago
To be honest I think this issue is out of scope.
This plugin simply checks if .format
is used. It does not analyze the syntax or the lexical structure. To correctly cover this kind of edge case would make the implementation way too complicated.
You can use #noqa
to disable checking on this line. Or you can break the statement into two lines.
The following code triggers an FS002 error:
However, attempting to change it to an f-string results in a syntax error: