Skip to content

Commit a21fa08

Browse files
Enforce repo-review rules
1 parent aa4b6b0 commit a21fa08

File tree

8 files changed

+20
-12
lines changed

8 files changed

+20
-12
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ repos:
2020
- id: ruff
2121
args: ["--fix", "--show-fixes"]
2222
- id: ruff-format
23+
24+
- repo: https://github.com/scientific-python/cookie
25+
rev: 2024.04.23
26+
hooks:
27+
- id: sp-repo-review

.pyup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# autogenerated pyup.io config file
1+
# autogenerated pyup.io config file
22
# see https://pyup.io/docs/configuration/ for all available options
33

44
schedule: every month

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Numcodecs
22
=========
33

4-
Numcodecs is a Python package providing buffer compression and transformation
4+
Numcodecs is a Python package providing buffer compression and transformation
55
codecs for use in data storage and communication applications.
66

77
.. image:: https://readthedocs.org/projects/numcodecs/badge/?version=latest

docs/checksum32.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ JenkinsLookup3
3737
--------------
3838

3939
.. autoclass:: JenkinsLookup3
40-
40+
4141
.. autoattribute:: codec_id
4242
.. autoattribute:: initval
4343
.. autoattribute:: prefix

numcodecs/blosc.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def decompress_partial(source, start, nitems, dest=None):
468468
raise RuntimeError('error during blosc partial decompression: %d', ret)
469469

470470
return dest
471-
471+
472472

473473
# set the value of this variable to True or False to override the
474474
# default adaptive behaviour

numcodecs/jenkins.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ cpdef uint32_t jenkins_lookup3(const uint8_t[::1] _data, uint32_t initval=0):
168168
if length == 12:
169169
c += (<uint32_t>k[11]) << 24
170170
length -= 1
171-
171+
172172
if length == 11:
173173
c += (<uint32_t>k[10]) << 16
174174
length -= 1
@@ -231,7 +231,7 @@ cdef inline uint32_t _jenkins_lookup3_final(uint32_t a, uint32_t b, uint32_t c):
231231
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
232232
is commonly produced by subtraction) look like a single 1-bit
233233
difference.
234-
* the base values were pseudorandom, all zero but one bit set, or
234+
* the base values were pseudorandom, all zero but one bit set, or
235235
all zero plus a counter that starts at zero.
236236
237237
These constants passed:
@@ -279,7 +279,7 @@ cdef inline (uint32_t, uint32_t, uint32_t) _jenkins_lookup3_mix(uint32_t a, uint
279279
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
280280
is commonly produced by subtraction) look like a single 1-bit
281281
difference.
282-
* the base values were pseudorandom, all zero but one bit set, or
282+
* the base values were pseudorandom, all zero but one bit set, or
283283
all zero plus a counter that starts at zero.
284284
285285
Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
@@ -289,7 +289,7 @@ cdef inline (uint32_t, uint32_t, uint32_t) _jenkins_lookup3_mix(uint32_t a, uint
289289
14 9 3 7 17 3
290290
Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
291291
for "differ" defined as + with a one-bit base and a two-bit delta. I
292-
used http://burtleburtle.net/bob/hash/avalanche.html to choose
292+
used http://burtleburtle.net/bob/hash/avalanche.html to choose
293293
the operations, constants, and arrangements of the variables.
294294
295295
This does not achieve avalanche. There are input bits of (a,b,c)

numcodecs/zstd.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ cdef extern from "zstd.h":
2828

2929
ZSTD_CCtx* ZSTD_createCCtx() nogil
3030
size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx) nogil
31-
size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx,
32-
ZSTD_cParameter param,
31+
size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx,
32+
ZSTD_cParameter param,
3333
int value) nogil
3434

3535
size_t ZSTD_compress2(ZSTD_CCtx* cctx,
@@ -235,7 +235,7 @@ class Zstd(Codec):
235235
"""
236236

237237
codec_id = 'zstd'
238-
238+
239239
# Note: unlike the LZ4 and Blosc codecs, there does not appear to be a (currently)
240240
# practical limit on the size of buffers that Zstd can process and so we don't
241241
# enforce a max_buffer_size option here.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ msgpack = [
6565
]
6666
zfpy = [
6767
"zfpy>=1.0.0",
68-
"numpy<2.0.0",
68+
"numpy<2.0.0",
6969
]
7070
pcodec = [
7171
"pcodec>=0.2.0",
@@ -98,6 +98,9 @@ exclude_lines = [
9898
"pragma: ${PY_MAJOR_VERSION} no cover",
9999
]
100100

101+
[tool.repo-review]
102+
ignore = ["PY005", "PY007", "PP302", "PP304", "PP308", "GH103", "GH212", "PC111", "PC140", "PC160", "PC170", "PC180", "MY100", "RF103"]
103+
101104
[tool.pytest.ini_options]
102105
addopts = "-ra --strict-config --strict-markers --cov=numcodecs --cov-report xml --doctest-modules --doctest-glob=*.pyx"
103106
doctest_optionflags = [

0 commit comments

Comments
 (0)