Skip to content

Commit 3fc6f89

Browse files
jbuseckeli-em
andauthored
Bump ruff to newest version and resulting changes (#1727)
The ruff version was quite old `0.8.0` vs `0.15.3`. I bumped the version and needed a few small changes resulting from the new version. Let me know if these changes are not desired and I can add `RUF059` to the ignore list. --------- Co-authored-by: Luiz Irber <luiz@earthmover.io>
1 parent 9e4e5b6 commit 3fc6f89

6 files changed

Lines changed: 32 additions & 32 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: mixed-line-ending
1111

1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: 'v0.8.0'
13+
rev: 'v0.15.3'
1414
hooks:
1515
- id: ruff-format
1616
- id: ruff

icechunk-python/benchmarks/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_task_chunk_shape(
6060
if c == s or left is None:
6161
task_chunk_shape.append(c)
6262
else:
63-
q, r = divmod(s, c)
63+
q, _ = divmod(s, c)
6464
if q > left:
6565
task_chunk_shape.append(left * c)
6666
else:

icechunk-python/pixi.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

icechunk-python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = ["zarr>=3.1.0"]
2727
dev = [
2828
{ include-group = "test" },
2929
"mypy",
30-
"ruff==0.8.0",
30+
"ruff==0.15.3",
3131
"maturin>=1.7,<2.0",
3232
"maturin-import-hook>=0.3.0",
3333
]

icechunk-python/tests/test_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,6 @@ def test_clear_virtual_chunk_containers_persists_through_reopen() -> None:
314314

315315
# VCCs should be cleared after reopen
316316
reopened_vccs = repo.config.virtual_chunk_containers or {}
317-
assert (
318-
reopened_vccs == {}
319-
), f"Expected no VCCs after reopen, got: {list(reopened_vccs.keys())}"
317+
assert reopened_vccs == {}, (
318+
f"Expected no VCCs after reopen, got: {list(reopened_vccs.keys())}"
319+
)

icechunk-python/tests/test_stateful_repo_ops.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -913,16 +913,16 @@ def expire_snapshots(
913913
)
914914

915915
expired_but_remaining = actual & remaining_snapshot_ids
916-
assert (
917-
not expired_but_remaining
918-
), f"Snapshots marked as expired but still in ancestry: {expired_but_remaining}"
919-
920-
assert (
921-
actual_deleted_branches == expected.deleted_branches
922-
), f"deleted branches mismatch: actual={actual_deleted_branches}, expected={expected.deleted_branches}"
923-
assert (
924-
actual_deleted_tags == expected.deleted_tags
925-
), f"deleted tags mismatch: actual={actual_deleted_tags}, expected={expected.deleted_tags}"
916+
assert not expired_but_remaining, (
917+
f"Snapshots marked as expired but still in ancestry: {expired_but_remaining}"
918+
)
919+
920+
assert actual_deleted_branches == expected.deleted_branches, (
921+
f"deleted branches mismatch: actual={actual_deleted_branches}, expected={expected.deleted_branches}"
922+
)
923+
assert actual_deleted_tags == expected.deleted_tags, (
924+
f"deleted tags mismatch: actual={actual_deleted_tags}, expected={expected.deleted_tags}"
925+
)
926926

927927
for branch in actual_deleted_branches:
928928
self.maybe_checkout_branch(branch)

0 commit comments

Comments
 (0)