-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR removes a portion of FURB131 which suggested replacing most instances of `del` with `.pop()`. The reasoning behid it was not well founded, and in most cases, it is better to just leave the `del` statememt as it is. In one instance though, which is the `del x[:]` usage, it is more preferable to use the `.clear()` method, as it is faster and more readable. Closes #234.
- Loading branch information
Showing
4 changed files
with
18 additions
and
40 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
test/data/err_131.py:6:1 [FURB131]: Replace `del x[y]` with `x.pop(y)` | ||
test/data/err_131.py:7:1 [FURB131]: Replace `del x[y]` with `x.pop(y)` | ||
test/data/err_131.py:8:1 [FURB131]: Replace `del x[:]` with `x.clear()` | ||
test/data/err_131.py:6:1 [FURB131]: Replace `del x[:]` with `x.clear()` |