Skip to content

Commit 4f08a00

Browse files
committed
Correctly denote positional-only arguments in stubs
1 parent 838b787 commit 4f08a00

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ that PyPy is no longer supported.
2222
for decompressing gzip files. PyPy should not be used for workloads that
2323
require heavy zlib-compatible compression/decompression. As such it was
2424
deemed unnecessary to continue supporting PyPy.
25+
+ Stub files with type information have now been updated to correctly display
26+
positional-only arguments.
2527
+ A ``--no-name`` flag has been added to ``python -m isal.igzip``.
2628
+ Cython is no longer required as a build dependency.
2729
+ a fast function calling method ``METH_FASTCALL`` is now used to call the

src/isal/igzip_lib.pyi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ MEM_LEVEL_LARGE: int
3333
MEM_LEVEL_EXTRA_LARGE: int
3434
IsalError: Exception
3535

36-
def compress(data, level: int = ISAL_DEFAULT_COMPRESSION,
36+
def compress(__data,
37+
level: int = ISAL_DEFAULT_COMPRESSION,
3738
flag: int = COMP_DEFLATE,
3839
mem_level: int = MEM_LEVEL_DEFAULT,
3940
hist_bits: int = MAX_HIST_BITS) -> bytes: ...
40-
def decompress(data, flag: int = DECOMP_DEFLATE,
41+
def decompress(__data,
42+
flag: int = DECOMP_DEFLATE,
4143
hist_bits: int = MAX_HIST_BITS,
4244
bufsize: int = DEF_BUF_SIZE) -> bytes: ...
4345

@@ -52,4 +54,4 @@ class IgzipDecompressor:
5254
hist_bits: int = MAX_HIST_BITS,
5355
zdict = None) -> None: ...
5456

55-
def decompress(self, data, max_length = -1) -> bytes: ...
57+
def decompress(self, __data, max_length = -1) -> bytes: ...

src/isal/isal_zlib.pyi

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,26 @@ Z_FINISH: int
3131

3232
error: Exception
3333

34-
def adler32(data, value: int = 1) -> int: ...
35-
def crc32(data, value: int = 0) -> int: ...
34+
def adler32(__data, __value: int = 1) -> int: ...
35+
def crc32(__data, __value: int = 0) -> int: ...
3636

37-
def compress(data, level: int = ISAL_DEFAULT_COMPRESSION,
37+
def compress(__data,
38+
level: int = ISAL_DEFAULT_COMPRESSION,
3839
wbits: int = MAX_WBITS) -> bytes: ...
39-
def decompress(data, wbits: int = MAX_WBITS,
40+
def decompress(__data,
41+
wbits: int = MAX_WBITS,
4042
bufsize: int = DEF_BUF_SIZE) -> bytes: ...
4143

4244
class Compress:
43-
def compress(self, data) -> bytes: ...
45+
def compress(self, __data) -> bytes: ...
4446
def flush(self, mode: int = Z_FINISH) -> bytes: ...
4547

4648
class Decompress:
4749
unused_data: bytes
4850
unconsumed_tail: bytes
4951
eof: bool
5052

51-
def decompress(self, data, max_length: int = 0) -> bytes: ...
53+
def decompress(self, __data, max_length: int = 0) -> bytes: ...
5254
def flush(self, length: int = DEF_BUF_SIZE) -> bytes: ...
5355

5456
def compressobj(level: int = ISAL_DEFAULT_COMPRESSION,

0 commit comments

Comments
 (0)