MichaelKim0407 / flake8-use-fstring

MIT License
51 stars 7 forks source link

Incorrect FS003 #7

Closed sondrelg closed 4 years ago

sondrelg commented 4 years ago

Hi,

I have a regex pattern that triggers the FS003 f-string missing prefix error, despite it not being an f-string:

pattern = re.compile(r'({[\w]+\})')

Not sure this is something you want to correct :)

MichaelKim0407 commented 4 years ago

Hi,

As documented in README, this error code can produce false positives. It is a simple check and is not designed to be intelligent. Feel free to submit a PR if you want to improve the check.

For your use case, please either use noqa on the line or disable the check. The check is disabled by default.