Skip to content

Commit

Permalink
Enforce ruff/flake8-pie rules (PIE)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Oct 14, 2024
1 parent c283106 commit cb062ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions numcodecs/tests/test_bitround.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ def test_round_zero_to_zero(dtype):
# Don't understand Milan's original test:
# How is it possible to have negative keepbits?
# for k in range(-5, 50):
for k in range(0, max_bits[dtype]):
for k in range(max_bits[dtype]):
ar = round(a, k)
np.testing.assert_equal(a, ar)


def test_round_one_to_one(dtype):
a = np.ones((3, 2), dtype=dtype)
for k in range(0, max_bits[dtype]):
for k in range(max_bits[dtype]):
ar = round(a, k)
np.testing.assert_equal(a, ar)


def test_round_minus_one_to_minus_one(dtype):
a = -np.ones((3, 2), dtype=dtype)
for k in range(0, max_bits[dtype]):
for k in range(max_bits[dtype]):
ar = round(a, k)
np.testing.assert_equal(a, ar)

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ extend-select = [
"B",
"I",
"PGH",
"PIE",
"PT",
"RSE",
"RUF",
Expand Down

0 comments on commit cb062ad

Please sign in to comment.