ruff/crates
Dhruv Manilawala 17fba99ed4
Report precise location for invalid conversion flag (#7809)
## Summary

This PR updates the parser definition to use the precise location when reporting
an invalid f-string conversion flag error.

Taking the following example code:
```python
f"{foo!x}"
```

On earlier version,
```
Error: f-string: invalid conversion character at byte offset 6
```

Now,
```
Error: f-string: invalid conversion character at byte offset 7
```

This becomes more useful when there's whitespace between `!` and the flag value
although that is not valid but we can't detect that now.

## Test Plan

As mentioned above.
2023-10-05 17:46:14 +05:30
..
flake8_to_ruff Bump Ruff version to v0.0.292 (#7761) 2023-10-02 12:14:47 -04:00
ruff_benchmark Bump ureq from 2.7.1 to 2.8.0 (#7756) 2023-10-02 09:49:59 -04:00
ruff_cache Introduce FormatterSettings (#7545) 2023-09-21 08:01:24 +02:00
ruff_cli Consider nursery rules to be in-preview for ruff rule (#7812) 2023-10-04 11:12:43 -04:00
ruff_dev Rename FixKind to FixAvailability (#7658) 2023-10-02 14:38:25 +00:00
ruff_diagnostics Enable formatting for Jupyter notebooks (#7749) 2023-10-02 14:44:18 +00:00
ruff_formatter Add most formatter options to ruff.toml / pyproject.toml (#7566) 2023-09-22 15:47:57 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_linter Split up ast_if.rs into distinct rule files (#7820) 2023-10-04 19:39:05 +00:00
ruff_macros Rename FixKind to FixAvailability (#7658) 2023-10-02 14:38:25 +00:00
ruff_notebook Write full Jupyter notebook to stdout (#7748) 2023-10-02 14:20:13 +00:00
ruff_python_ast Show changed files when running under --check (#7788) 2023-10-03 18:50:06 +00:00
ruff_python_codegen Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_python_formatter Correct error in tuple example in ruff formatter docs (#7822) 2023-10-04 22:51:17 +00:00
ruff_python_index Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_python_literal Implement our own small-integer optimization (#7584) 2023-09-25 15:13:21 +00:00
ruff_python_parser Report precise location for invalid conversion flag (#7809) 2023-10-05 17:46:14 +05:30
ruff_python_resolver Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic Check sequence type before triggering unnecessary-enumerate (FURB148) len suggestion (#7781) 2023-10-03 14:39:14 +00:00
ruff_python_stdlib Use u8 to represent version segments (#7578) 2023-09-21 14:24:51 -04:00
ruff_python_trivia Extend pragma comment cases (#7687) 2023-09-28 18:55:19 +00:00
ruff_shrinking Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_source_file Skip BOM when inserting start-of-file imports (#7622) 2023-09-23 19:36:50 +00:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_workspace Change crlf to cr-lf in docs (#7766) 2023-10-02 21:09:11 +00:00