Skip to content

Commit 4dfb1af

Browse files
Enforce ruff/flake8-pie rules (PIE) (#599)
* Apply ruff/flake8-pie rule PIE808 PIE808 Unnecessary `start` argument in `range` * Enforce ruff/flake8-pie rules (PIE)
1 parent a12b433 commit 4dfb1af

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

numcodecs/tests/test_bitround.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ def test_round_zero_to_zero(dtype):
2424
# Don't understand Milan's original test:
2525
# How is it possible to have negative keepbits?
2626
# for k in range(-5, 50):
27-
for k in range(0, max_bits[dtype]):
27+
for k in range(max_bits[dtype]):
2828
ar = round(a, k)
2929
np.testing.assert_equal(a, ar)
3030

3131

3232
def test_round_one_to_one(dtype):
3333
a = np.ones((3, 2), dtype=dtype)
34-
for k in range(0, max_bits[dtype]):
34+
for k in range(max_bits[dtype]):
3535
ar = round(a, k)
3636
np.testing.assert_equal(a, ar)
3737

3838

3939
def test_round_minus_one_to_minus_one(dtype):
4040
a = -np.ones((3, 2), dtype=dtype)
41-
for k in range(0, max_bits[dtype]):
41+
for k in range(max_bits[dtype]):
4242
ar = round(a, k)
4343
np.testing.assert_equal(a, ar)
4444

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ extend-select = [
141141
"B",
142142
"I",
143143
"PGH",
144+
"PIE",
144145
"PT",
145146
"RSE",
146147
"RUF",

0 commit comments

Comments
 (0)