Skip to content

Commit ae51834

Browse files
authored
Merge branch 'main' into update-pcodec
2 parents 6d4adb2 + 1855f0c commit ae51834

File tree

17 files changed

+65
-63
lines changed

17 files changed

+65
-63
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,6 @@ jobs:
102102
103103
- uses: codecov/codecov-action@v5
104104
with:
105+
fail_ci_if_error: true
105106
token: ${{ secrets.CODECOV_TOKEN }}
106107
verbose: true

.github/workflows/wheel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
submodules: true
2828

29-
- uses: pypa/cibuildwheel@v2.21.3
29+
- uses: pypa/cibuildwheel@v2.22.0
3030

3131
- uses: actions/upload-artifact@v4
3232
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: debug-statements
1616

1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.7.4
18+
rev: v0.8.0
1919
hooks:
2020
- id: ruff
2121
args: ["--fix", "--show-fixes"]

numcodecs/abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_config(self):
8484
# override in sub-class if need special encoding of config values
8585

8686
# setup config object
87-
config = dict(id=self.codec_id)
87+
config = {'id': self.codec_id}
8888

8989
# by default, assume all non-private members are configuration
9090
# parameters - override this in sub-class if not the case

numcodecs/categorize.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ def decode(self, buf, out=None):
8585
return dec
8686

8787
def get_config(self):
88-
config = dict(
89-
id=self.codec_id,
90-
labels=self.labels,
91-
dtype=self.dtype.str,
92-
astype=self.astype.str,
93-
)
88+
config = {
89+
'id': self.codec_id,
90+
'labels': self.labels,
91+
'dtype': self.dtype.str,
92+
'astype': self.astype.str,
93+
}
9494
return config
9595

9696
def __repr__(self):

numcodecs/delta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def decode(self, buf, out=None):
9191

9292
def get_config(self):
9393
# override to handle encoding dtypes
94-
return dict(id=self.codec_id, dtype=self.dtype.str, astype=self.astype.str)
94+
return {'id': self.codec_id, 'dtype': self.dtype.str, 'astype': self.astype.str}
9595

9696
def __repr__(self):
9797
r = f'{type(self).__name__}(dtype={self.dtype.str!r}'

numcodecs/fixedscaleoffset.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ def decode(self, buf, out=None):
116116

117117
def get_config(self):
118118
# override to handle encoding dtypes
119-
return dict(
120-
id=self.codec_id,
121-
scale=self.scale,
122-
offset=self.offset,
123-
dtype=self.dtype.str,
124-
astype=self.astype.str,
125-
)
119+
return {
120+
'id': self.codec_id,
121+
'scale': self.scale,
122+
'offset': self.offset,
123+
'dtype': self.dtype.str,
124+
'astype': self.astype.str,
125+
}
126126

127127
def __repr__(self):
128128
r = f'{type(self).__name__}(scale={self.scale}, offset={self.offset}, dtype={self.dtype.str!r}'

numcodecs/json.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ def __init__(
5252
else:
5353
separators = ', ', ': '
5454
separators = tuple(separators)
55-
self._encoder_config = dict(
56-
skipkeys=skipkeys,
57-
ensure_ascii=ensure_ascii,
58-
check_circular=check_circular,
59-
allow_nan=allow_nan,
60-
indent=indent,
61-
separators=separators,
62-
sort_keys=sort_keys,
63-
)
55+
self._encoder_config = {
56+
'skipkeys': skipkeys,
57+
'ensure_ascii': ensure_ascii,
58+
'check_circular': check_circular,
59+
'allow_nan': allow_nan,
60+
'indent': indent,
61+
'separators': separators,
62+
'sort_keys': sort_keys,
63+
}
6464
self._encoder = _json.JSONEncoder(**self._encoder_config)
65-
self._decoder_config = dict(strict=strict)
65+
self._decoder_config = {'strict': strict}
6666
self._decoder = _json.JSONDecoder(**self._decoder_config)
6767

6868
def encode(self, buf):
@@ -89,7 +89,7 @@ def decode(self, buf, out=None):
8989
return dec
9090

9191
def get_config(self):
92-
config = dict(id=self.codec_id, encoding=self._text_encoding)
92+
config = {'id': self.codec_id, 'encoding': self._text_encoding}
9393
config.update(self._encoder_config)
9494
config.update(self._decoder_config)
9595
return config

numcodecs/msgpacks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ def decode(self, buf, out=None):
7575
return dec
7676

7777
def get_config(self):
78-
return dict(
79-
id=self.codec_id,
80-
raw=self.raw,
81-
use_single_float=self.use_single_float,
82-
use_bin_type=self.use_bin_type,
83-
)
78+
return {
79+
'id': self.codec_id,
80+
'raw': self.raw,
81+
'use_single_float': self.use_single_float,
82+
'use_bin_type': self.use_bin_type,
83+
}
8484

8585
def __repr__(self):
8686
return f'MsgPack(raw={self.raw!r}, use_bin_type={self.use_bin_type!r}, use_single_float={self.use_single_float!r})'

numcodecs/pickles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def decode(self, buf, out=None):
4949
return dec
5050

5151
def get_config(self):
52-
return dict(id=self.codec_id, protocol=self.protocol)
52+
return {'id': self.codec_id, 'protocol': self.protocol}
5353

5454
def __repr__(self):
5555
return f'Pickle(protocol={self.protocol})'

0 commit comments

Comments
 (0)