ruff/crates/ruff_python_ast
Charlie Marsh 4892167217
Avoid panics for implicitly-concatenated docstrings (#3584)
## Summary

In the rare event that a docstring contains an implicit string concatenation, we currently have the potential to panic, because we assume that if a string starts with triple quotes, it _ends_ with triple quotes. But with implicit concatenation, that's not the case: a single `Expr` could start and end with different quote styles, because it can contain multiple string tokens.

Supporting these "properly" is pretty hard. In some cases it's hard to even know what the "right" behavior is. So for now, I'm just detecting and warning, which is better than a panic.

Closes #3543.

Closes #3585.
2023-03-19 14:16:50 -04:00
..
src Avoid panics for implicitly-concatenated docstrings (#3584) 2023-03-19 14:16:50 -04:00
Cargo.toml Upgrade RustPython to fix Serde dependency (#3481) 2023-03-13 12:29:31 -04:00