Skip to content

Commit f7993db

Browse files
authored
V3 update pre commit (#1808)
1 parent f046322 commit f7993db

File tree

8 files changed

+19
-28
lines changed

8 files changed

+19
-28
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
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/charliermarsh/ruff-pre-commit
10-
rev: 'v0.2.1'
10+
rev: 'v0.4.1'
1111
hooks:
1212
- id: ruff
1313
args: ["--fix", "--show-fixes"]
@@ -18,11 +18,11 @@ repos:
1818
- id: codespell
1919
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo,zar", "-S", "fixture"]
2020
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v4.5.0
21+
rev: v4.6.0
2222
hooks:
2323
- id: check-yaml
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.8.0
25+
rev: v1.9.0
2626
hooks:
2727
- id: mypy
2828
files: src

src/zarr/convenience.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Convenience functions for storing and loading data."""
2+
23
import itertools
34
import os
45
import re

src/zarr/n5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
"""This module contains a storage class and codec to support the N5 format.
2-
"""
1+
"""This module contains a storage class and codec to support the N5 format."""
2+
33
import os
44
import struct
55
import sys

src/zarr/storage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
path) and a `getsize` method (return the size in bytes of a given value).
1515
1616
"""
17+
1718
import atexit
1819
import errno
1920
import glob

src/zarr/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def __init__(self, group, expand=False, level=None):
518518
UP_AND_RIGHT="\u2514",
519519
HORIZONTAL="\u2500",
520520
VERTICAL="\u2502",
521-
VERTICAL_AND_RIGHT="\u251C",
521+
VERTICAL_AND_RIGHT="\u251c",
522522
)
523523

524524
def __bytes__(self):

src/zarr/v3/common.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,13 @@ def parse_configuration(data: JSON) -> JSON:
111111
@overload
112112
def parse_named_configuration(
113113
data: JSON, expected_name: Optional[str] = None
114-
) -> Tuple[str, Dict[str, JSON]]:
115-
...
114+
) -> Tuple[str, Dict[str, JSON]]: ...
116115

117116

118117
@overload
119118
def parse_named_configuration(
120119
data: JSON, expected_name: Optional[str] = None, *, require_configuration: bool = True
121-
) -> Tuple[str, Optional[Dict[str, JSON]]]:
122-
...
120+
) -> Tuple[str, Optional[Dict[str, JSON]]]: ...
123121

124122

125123
def parse_named_configuration(

tests/v3/test_common.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,19 @@ def test_product(data: Tuple[int, ...]):
1717

1818

1919
# todo: test
20-
def test_concurrent_map():
21-
...
20+
def test_concurrent_map(): ...
2221

2322

2423
# todo: test
25-
def test_to_thread():
26-
...
24+
def test_to_thread(): ...
2725

2826

2927
# todo: test
30-
def test_enum_names():
31-
...
28+
def test_enum_names(): ...
3229

3330

3431
# todo: test
35-
def test_parse_enum():
36-
...
32+
def test_parse_enum(): ...
3733

3834

3935
@pytest.mark.parametrize("data", [("foo", "bar"), (10, 11)])
@@ -93,5 +89,4 @@ def parse_dtype(data: Tuple[str, np.dtype]):
9389

9490

9591
# todo: figure out what it means to test this
96-
def test_parse_fill_value():
97-
...
92+
def test_parse_fill_value(): ...

tests/v3/test_metadata.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99

1010

1111
# todo: test
12-
def test_datatype_enum():
13-
...
12+
def test_datatype_enum(): ...
1413

1514

1615
# todo: test
1716
# this will almost certainly be a collection of tests
18-
def test_array_metadata_v3():
19-
...
17+
def test_array_metadata_v3(): ...
2018

2119

2220
# todo: test
2321
# this will almost certainly be a collection of tests
24-
def test_array_metadata_v2():
25-
...
22+
def test_array_metadata_v2(): ...
2623

2724

2825
@pytest.mark.parametrize("data", [None, ("a", "b", "c"), ["a", "a", "a"]])
@@ -37,8 +34,7 @@ def parse_dimension_names_invalid(data: Any) -> None:
3734

3835

3936
# todo: test
40-
def test_parse_attributes() -> None:
41-
...
37+
def test_parse_attributes() -> None: ...
4238

4339

4440
def test_parse_zarr_format_v3_valid() -> None:

0 commit comments

Comments
 (0)