mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Hypothesis found that when we have a statement like `pass\r`, we detect that `\r` is the default and parse the trailing newline as `Newline(None)`. However, when we render the statement back out again, since we don't have a module, we construct a default module which treats `Newline(None)` as a `\n` not a '\r'. So, when we are parsing statements or expressions, disable auto-inferring the default newline and always infer the default rendered newline (`\n`) so that rendering a statement/expression back out behaves as expected. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_detect_config.py | ||
| test_footer_behavior.py | ||
| test_parse_errors.py | ||
| test_whitespace_parser.py | ||
| test_wrapped_tokenize.py | ||