ruff
48921672 - Avoid panics for implicitly-concatenated docstrings (#3584)

Commit
2 years ago
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.
Author
Parents
Loading