-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
e23bb9d
commit e3af85a
Showing
3 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
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,9 @@ | ||
print([1, 2, 3][3]) # PLE0643 | ||
print([1, 2, 3][-4]) # PLE0643 | ||
print([1, 2, 3][9223372036854775807]) # PLE0643 | ||
print([1, 2, 3][-9223372036854775807]) # PLE0643 | ||
print([1, 2, 3][999999999999999999999999999999999999999999]) # PLE0643 | ||
print([1, 2, 3][-999999999999999999999999999999999999999999]) # 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][-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
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