Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pylint] - add unnecessary-list-index-lookup (PLR1736) + autofix #7999

Merged
merged 20 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update crates/ruff_linter/src/rules/pylint/rules/unnecessary_list_ind…
…ex_lookup.rs

Co-authored-by: Zanie Blue <[email protected]>
  • Loading branch information
diceroll123 and zanieb authored Nov 28, 2023
commit 33bdba85cc18aca266f5fdc64fe32f5139195788
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ruff_text_size::TextRange;
use crate::checkers::ast::Checker;

/// ## What it does
/// Checks for uses of enumeration and accessing the value by index lookup.
/// Checks for access of a list item at the current index when using enumeration.
///
/// ## Why is this bad?
/// It is more succinct to use the variable for the value at the current index which is already in scope from the iterator.
Expand Down
Loading