ruff/crates
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
..
ruff_benchmark Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_cache Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_cli Bump version to 0.1.11 (#9370) 2024-01-02 17:46:06 -05:00
ruff_dev Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_diagnostics Enable annotation quoting for multi-line expressions (#9142) 2023-12-15 01:03:09 +00:00
ruff_formatter Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_index Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_linter Add missing preview link (#9386) 2024-01-03 19:54:25 -05:00
ruff_macros remove several uses of unsafe (#8600) 2023-11-28 09:50:03 -05:00
ruff_notebook Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_python_ast Misc. small tweaks from perusing modules (#9383) 2024-01-03 12:30:25 -05:00
ruff_python_codegen Remove source path from parser errors (#9322) 2023-12-30 20:33:05 +00:00
ruff_python_formatter Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_python_index Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_python_literal Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_python_parser Ignore trailing quotes for unclosed l-brace errors (#9388) 2024-01-04 05:00:55 +00:00
ruff_python_resolver Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_python_semantic Misc. small tweaks from perusing modules (#9383) 2024-01-03 12:30:25 -05:00
ruff_python_stdlib Treat all typing_extensions members as typing aliases (#9335) 2023-12-31 14:23:33 -04:00
ruff_python_trivia Use a sorted vector for block comments (#9337) 2023-12-31 19:52:40 +00:00
ruff_shrinking Bump version to 0.1.11 (#9370) 2024-01-02 17:46:06 -05:00
ruff_source_file Use consistent re-export from ruff_source_file (#9320) 2023-12-30 14:48:45 -05:00
ruff_text_size Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_wasm Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_workspace Add paths to toml parse errors (#9358) 2024-01-02 11:56:51 -05:00