Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce ruff/flake8-pie rules (PIE) #599

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading