While working on my shed autoformatter, which includes some libcst-based passes, Hypothesmith uncovered a bug:
|
_INDENT_RE: Pattern[str] = re.compile(r"[ \t]+") |
For example, 'class A:\n\x0c pass\n' is a valid class-declaration. It can even be parsed by libcst.parse_module(), but the refactoring tooling chokes on it.
(this is a terrible bug to report and I hope it never happens in the wild, but there you go!)