Skip to content

Commit

Permalink
Remove false positive FS003 for pure regex-strings containing curly b…
Browse files Browse the repository at this point in the history
…rackets
  • Loading branch information
teonat committed Mar 12, 2021
1 parent bdac92f commit 4ea2287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flake8_use_fstring/prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

FSTRING_REGEX = _re.compile(r'^([a-zA-Z]*?[fF][a-zA-Z]*?){1}["\']')
NON_FSTRING_REGEX = _re.compile(
r'^[a-zA-Z]*(?:\'\'\'|\'|"""|")(.*?{.+?}.*)(?:\'|\'\'\'|"|""")$',
r'^[a-zA-Z]*(?<!\b[rR])(?:\'\'\'|\'|"""|")(.*?{.+?}.*)(?:\'|\'\'\'|"|""")$',
)


Expand Down

0 comments on commit 4ea2287

Please sign in to comment.