ruff/crates/ruff_python_parser
Charlie Marsh f0d43dafcf
Ignore trailing quotes for unclosed l-brace errors (#9388)
## Summary

Given:

```python
F"{"ڤ
```

We try to locate the "unclosed left brace" error by subtracting the
quote size from the lexer offset -- so we subtract 1 from the end of the
source, which puts us in the middle of a Unicode character. I don't
think we should try to adjust the offset in this way, since there can be
content _after_ the quote. For example, with the advent of PEP 701, this
string could reasonably be fixed as:

```python
F"{"ڤ"}"
````

Closes https://github.com/astral-sh/ruff/issues/9379.
2024-01-04 05:00:55 +00:00
..
src Ignore trailing quotes for unclosed l-brace errors (#9388) 2024-01-04 05:00:55 +00:00
build.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
Cargo.toml Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00