`_INDENT_RE` is too narrow - `'\x0c '` is strange but valid indent whitespace
Open
bug
parsing
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Description
While working on my [`shed` autoformatter](https://github.com/Zac-HD/shed/), which includes some libcst-based passes, [Hypothesmith](https://github.com/Zac-HD/hypothesmith) uncovered a bug:
https://github.com/Instagram/LibCST/blob/c22ed6a4c67e5f16f0b928ca8a0c2944056eb216/libcst/_parser/types/config.py#L20
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!)
Contributor guide
Assessment
This issue has not been assessed yet.