LibCST
LibCST copied to clipboard
Incorrect validation: space after 'while' keyword
I was working on a linter/fixer tool and decided to test it against the stdlib to see what it would do.
I was surprised to see it fail on some stdlib modules with CSTValidationError
s.
I can report a number of these if they are useful to have tracked. I've so far seen "space after 'del'" and "space after 'while'".
Limiting ourselves to the while
case, here's a trivial reproducer:
while(True):
pass
From the stdlib, this is in difflib. Example snippet:
while(num_blanks_to_yield < 0):
num_blanks_to_yield += 1
yield None,('','\n'),True