flake8-simplify
flake8-simplify copied to clipboard
[New Rule] Find consecutive slices
Explanation
Find consecutive slices which can be replaced by just one slice.
Example
foo = [1,2,3,4]
# Bad
foo[1:][:2]
foo[1:][2:]
# Good
foo[1:3]
foo[3:]