We could have a rule that enforces the re documentation’s recommendation of rewriting re.compile("pattern") to re.compile(r"pattern"), and similar for the first argument of re.search, re.match, re.fullmatch, re.split, re.findall, re.finditer, re.sub, re.subn.
Prior art: flake8-literal LIT103 with the literal-re-pattern-raw option set to always.
We could have a rule that enforces the
redocumentation’s recommendation of rewritingre.compile("pattern")tore.compile(r"pattern"), and similar for the first argument ofre.search,re.match,re.fullmatch,re.split,re.findall,re.finditer,re.sub,re.subn.Prior art: flake8-literal
LIT103with theliteral-re-pattern-rawoption set toalways.