-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
652603a
commit 12e059a
Showing
3 changed files
with
22 additions
and
35 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
crates/ruff_linter/resources/test/fixtures/pylint/potential_index_error.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
print([1, 2, 3][3]) # PLE0643 | ||
print([1, 2, 3][-4]) # PLE0643 | ||
print([1, 2, 3][2147483647]) # PLE0643 | ||
print([1, 2, 3][-2147483647]) # PLE0643 | ||
print([1, 2, 3][9223372036854775807]) # PLE0643 | ||
print([1, 2, 3][-9223372036854775807]) # PLE0643 | ||
|
||
print([1, 2, 3][2]) # OK | ||
print([1, 2, 3][0]) # OK | ||
print([1, 2, 3][-3]) # OK | ||
print([1, 2, 3][3:]) # OK | ||
print([1, 2, 3][2147483648]) # OK (i32 overflow, ignored) | ||
print([1, 2, 3][-2147483648]) # OK (i32 overflow, ignored) | ||
print([1, 2, 3][-9223372036854775808]) # OK (i64 overflow, ignored) | ||
print([1, 2, 3][9223372036854775808]) # OK (i64 overflow, ignored) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 8 additions & 16 deletions
24
...pylint/snapshots/ruff_linter__rules__pylint__tests__PLE0643_potential_index_error.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters