ruff/crates
Alex Waygood 3abd5c08a5
[pylint] Recurse into subscript subexpressions when searching for list/dict lookups (PLR1733, PLR1736) (#13186)
## Summary

The `SequenceIndexVisitor` currently does not recurse into
subexpressions of subscripts when searching for subscript accesses that
would trigger this rule. That means that we don't currently detect
violations of the rule on snippets like this:

```py
data = {"a": 1, "b": 2}
column_names = ["a", "b"]
for index, column_name in enumerate(column_names):
    _ = data[column_names[index]]
```

Fixes #13183

## Test Plan

`cargo test -p ruff_linter`
2024-09-01 17:22:45 +01:00
..
red_knot [red-knot] Add docs on using RAYON_NUM_THREADS for better logging (#13140) 2024-08-28 17:14:56 +01:00
red_knot_python_semantic [red-knot] Fix call expression inference edge case for decorated functions (#13191) 2024-09-01 16:19:40 +01:00
red_knot_server [red-knot] Support untitled files in the server (#13044) 2024-08-23 12:47:35 +05:30
red_knot_wasm [red-knot] Improve the accuracy of the unresolved-import check (#13055) 2024-08-27 14:17:22 +01:00
red_knot_workspace Basic concurrent checking (#13049) 2024-08-24 09:53:27 +01:00
ruff Bump version to 0.6.3 (#13152) 2024-08-29 20:29:33 +05:30
ruff_benchmark [red-knot] implement basic call expression inference (#13164) 2024-08-30 12:51:29 -07:00
ruff_cache Fix cache key collisions for paths with separators (#12159) 2024-07-03 07:36:46 -05:00
ruff_db [red-knot] support deferred evaluation of type expressions (#13131) 2024-08-28 11:41:01 -07:00
ruff_dev Drop deprecated nursery rule group (#10172) 2024-06-27 13:44:11 +02:00
ruff_diagnostics [Minor typo] Fix article in "an fix" (#12797) 2024-08-10 21:22:00 -04:00
ruff_formatter Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
ruff_index [red-knot] small efficiency improvements and bugfixes to use-def map building (#12373) 2024-07-18 09:24:58 -07:00
ruff_linter [pylint] Recurse into subscript subexpressions when searching for list/dict lookups (PLR1733, PLR1736) (#13186) 2024-09-01 17:22:45 +01:00
ruff_macros Drop deprecated nursery rule group (#10172) 2024-06-27 13:44:11 +02:00
ruff_notebook Fallback to kernelspec to check if it's a Python notebook (#12875) 2024-08-14 12:36:09 +05:30
ruff_python_ast Added bytes type and some inference (#13061) 2024-08-22 13:27:15 -07:00
ruff_python_ast_integration_tests Rename PreorderVisitor to SourceOrderVisitor (#11798) 2024-06-07 17:01:58 +00:00
ruff_python_codegen Implement iter(), len() and is_empty() for all display-literal AST nodes (#12807) 2024-08-12 10:39:28 +00:00
ruff_python_formatter Implement iter(), len() and is_empty() for all display-literal AST nodes (#12807) 2024-08-12 10:39:28 +00:00
ruff_python_index Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
ruff_python_literal Remove some unused pub functions (#11576) 2024-05-28 09:56:51 -04:00
ruff_python_parser Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
ruff_python_resolver chore(deps): update rust crate insta to v1.38.0 (#10701) 2024-04-01 15:44:30 +00:00
ruff_python_semantic Avoid no-self-use for attrs-style validators (#13166) 2024-08-30 12:39:05 -04:00
ruff_python_stdlib Add time, tzinfo, and timezone as immutable function calls (#13109) 2024-08-27 15:51:32 +01:00
ruff_python_trivia Stabilize fixes for RET50{5-8} (#12840) 2024-08-14 18:15:45 +02:00
ruff_python_trivia_integration_tests Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_server Show full error context in server messages (#13029) 2024-08-21 15:36:16 +05:30
ruff_source_file Add API to emit type-checking diagnostics (#12988) 2024-08-20 07:22:30 +00:00
ruff_text_size Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
ruff_wasm Bump version to 0.6.3 (#13152) 2024-08-29 20:29:33 +05:30
ruff_workspace Add note about how Ruff handles PYI files wrt target version (#13111) 2024-08-27 17:28:22 +00:00