Skip to content

Commit 90b3aea

Browse files
Update ruff and associated changes (#2522)
* Upgrade ruff to 0.8.1 Remove deprecated rules: https://astral.sh/blog/ruff-v0.8.0#removal-of-six-deprecated-rules * Apply ruff/flake8-pyi rule PYI061 PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
1 parent f8e3432 commit 90b3aea

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_language_version:
77
python: python3
88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.8.0
10+
rev: v0.8.1
1111
hooks:
1212
- id: ruff
1313
args: ["--fix", "--show-fixes"]

pyproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,19 +294,14 @@ extend-select = [
294294
"W", # pycodestyle warnings
295295
]
296296
ignore = [
297-
"ANN101", # deprecated
298-
"ANN102", # deprecated
299297
"ANN401",
300-
"PT004", # deprecated
301-
"PT005", # deprecated
302298
"PT011", # TODO: apply this rule
303299
"PT012", # TODO: apply this rule
304300
"RET505",
305301
"RET506",
306302
"RUF005",
307303
"SIM108",
308304
"TRY003",
309-
"UP027", # deprecated
310305
"UP038", # https://github.com/astral-sh/ruff/issues/7871
311306
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
312307
"W191",

src/zarr/core/group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ async def from_store(
434434
async def open(
435435
cls,
436436
store: StoreLike,
437-
zarr_format: Literal[2, 3, None] = 3,
437+
zarr_format: Literal[2, 3] | None = 3,
438438
use_consolidated: bool | str | None = None,
439439
) -> AsyncGroup:
440440
"""Open a new AsyncGroup
@@ -1691,7 +1691,7 @@ def from_store(
16911691
def open(
16921692
cls,
16931693
store: StoreLike,
1694-
zarr_format: Literal[2, 3, None] = 3,
1694+
zarr_format: Literal[2, 3] | None = 3,
16951695
) -> Group:
16961696
"""Open a group from an initialized store.
16971697

0 commit comments

Comments
 (0)