Skip to content

Commit f46ad75

Browse files
committed
Fix classmethods in Python 3.13
1 parent 03cee4d commit f46ad75

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

numcodecs/zstd.pyx

Lines changed: 6 additions & 9 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.
@@ -258,20 +258,17 @@ class Zstd(Codec):
258258
self.level)
259259
return r
260260

261-
@classmethod
262261
@property
263-
def default_level(cls):
262+
def default_level(self):
264263
"""Returns the default compression level of the underlying zstd library."""
265264
return ZSTD_defaultCLevel()
266265

267-
@classmethod
268266
@property
269-
def min_level(cls):
267+
def min_level(self):
270268
"""Returns the minimum compression level of the underlying zstd library."""
271269
return ZSTD_minCLevel()
272270

273-
@classmethod
274271
@property
275-
def max_level(cls):
272+
def max_level(self):
276273
"""Returns the maximum compression level of the underlying zstd library."""
277274
return ZSTD_maxCLevel()

0 commit comments

Comments
 (0)