ruff/crates
konsti cab3a507bc
Fix find_only_token_in_range with expression parentheses (#5645)
## Summary

Fix an oversight in `find_only_token_in_range` where the following code
would panic due do the closing and opening parentheses being in the
range we scan:
```python
d1 = [
    ("a") if # 1
    ("b") else # 2
    ("c")
]
```
Closing and opening parentheses respectively are now correctly skipped.

## Test Plan

I added a regression test
2023-07-10 15:55:19 +02:00
..
flake8_to_ruff Bump version to 0.0.277 (#5515) 2023-07-04 17:31:32 -04:00
ruff Support autofix for some multiline str.format calls (#5638) 2023-07-10 09:49:13 -04:00
ruff_benchmark Create PyFormatOptions 2023-06-26 14:02:17 +02:00
ruff_cache Only use a single cache file per Python package (#5117) 2023-06-19 17:46:13 +02:00
ruff_cli Rework upstream categories so we can all_rules() (#5591) 2023-07-10 09:41:26 -04:00
ruff_dev Rework upstream categories so we can all_rules() (#5591) 2023-07-10 09:41:26 -04:00
ruff_diagnostics Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_formatter Fix typos found by codespell (#5607) 2023-07-08 12:33:18 +02:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Fix remaining Copyright rule references (#5577) 2023-07-07 02:49:19 +00:00
ruff_python_ast Format ExprIfExp (ternary operator) (#5597) 2023-07-07 19:11:52 +00:00
ruff_python_formatter Fix find_only_token_in_range with expression parentheses (#5645) 2023-07-10 15:55:19 +02:00
ruff_python_resolver Fix CI by downgrading to cargo insta 1.29.0 (#5589) 2023-07-08 14:54:49 +00:00
ruff_python_semantic Differentiate between runtime and typing-time annotations (#5575) 2023-07-07 00:21:44 -04:00
ruff_python_stdlib Remove some additional manual iterator matches (#5482) 2023-07-03 16:29:59 +00:00
ruff_python_whitespace Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_rustpython Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_textwrap Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_wasm [pyupgrade] Restore the keep-runtime-typing setting (#5470) 2023-07-03 02:11:31 +00:00