basedpyright 1.12.6 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/stdlib/_ast.pyi +279 -42
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +149 -12
- package/dist/typeshed-fallback/stdlib/_codecs.pyi +125 -14
- package/dist/typeshed-fallback/stdlib/_csv.pyi +130 -7
- package/dist/typeshed-fallback/stdlib/_ctypes.pyi +72 -17
- package/dist/typeshed-fallback/stdlib/_curses.pyi +626 -78
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +775 -153
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +61 -5
- package/dist/typeshed-fallback/stdlib/_imp.pyi +70 -15
- package/dist/typeshed-fallback/stdlib/_json.pyi +55 -12
- package/dist/typeshed-fallback/stdlib/_locale.pyi +63 -12
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +61 -4
- package/dist/typeshed-fallback/stdlib/_operator.pyi +238 -62
- package/dist/typeshed-fallback/stdlib/_posixsubprocess.pyi +25 -1
- package/dist/typeshed-fallback/stdlib/_random.pyi +23 -5
- package/dist/typeshed-fallback/stdlib/_socket.pyi +618 -63
- package/dist/typeshed-fallback/stdlib/_stat.pyi +140 -13
- package/dist/typeshed-fallback/stdlib/_thread.pyi +215 -22
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +44 -11
- package/dist/typeshed-fallback/stdlib/_tracemalloc.pyi +71 -10
- package/dist/typeshed-fallback/stdlib/_warnings.pyi +53 -6
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +43 -10
- package/dist/typeshed-fallback/stdlib/_winapi.pyi +255 -255
- package/dist/typeshed-fallback/stdlib/array.pyi +233 -44
- package/dist/typeshed-fallback/stdlib/atexit.pyi +50 -5
- package/dist/typeshed-fallback/stdlib/audioop.pyi +78 -26
- package/dist/typeshed-fallback/stdlib/binascii.pyi +105 -18
- package/dist/typeshed-fallback/stdlib/builtins.pyi +5254 -829
- package/dist/typeshed-fallback/stdlib/cmath.pyi +99 -23
- package/dist/typeshed-fallback/stdlib/errno.pyi +15 -0
- package/dist/typeshed-fallback/stdlib/faulthandler.pyi +33 -8
- package/dist/typeshed-fallback/stdlib/fcntl.pyi +199 -8
- package/dist/typeshed-fallback/stdlib/gc.pyi +130 -18
- package/dist/typeshed-fallback/stdlib/grp.pyi +58 -7
- package/dist/typeshed-fallback/stdlib/itertools.pyi +281 -42
- package/dist/typeshed-fallback/stdlib/marshal.pyi +82 -4
- package/dist/typeshed-fallback/stdlib/math.pyi +357 -61
- package/dist/typeshed-fallback/stdlib/mmap.pyi +47 -8
- package/dist/typeshed-fallback/stdlib/msvcrt.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/nt.pyi +118 -111
- package/dist/typeshed-fallback/stdlib/parser.pyi +55 -24
- package/dist/typeshed-fallback/stdlib/posix.pyi +7 -0
- package/dist/typeshed-fallback/stdlib/pwd.pyi +60 -10
- package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +61 -12
- package/dist/typeshed-fallback/stdlib/readline.pyi +184 -27
- package/dist/typeshed-fallback/stdlib/resource.pyi +56 -16
- package/dist/typeshed-fallback/stdlib/select.pyi +97 -5
- package/dist/typeshed-fallback/stdlib/spwd.pyi +60 -11
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +386 -48
- package/dist/typeshed-fallback/stdlib/syslog.pyi +27 -7
- package/dist/typeshed-fallback/stdlib/termios.pyi +88 -8
- package/dist/typeshed-fallback/stdlib/time.pyi +314 -37
- package/dist/typeshed-fallback/stdlib/unicodedata.pyi +264 -34
- package/dist/typeshed-fallback/stdlib/winreg.pyi +172 -132
- package/dist/typeshed-fallback/stdlib/zlib.pyi +108 -7
- package/package.json +1 -1
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The functions in this module allow compression and decompression using the
|
|
3
|
+
zlib library, which is based on GNU zip.
|
|
4
|
+
|
|
5
|
+
adler32(string[, start]) -- Compute an Adler-32 checksum.
|
|
6
|
+
compress(data[, level]) -- Compress data, with compression level 0-9 or -1.
|
|
7
|
+
compressobj([level[, ...]]) -- Return a compressor object.
|
|
8
|
+
crc32(string[, start]) -- Compute a CRC-32 checksum.
|
|
9
|
+
decompress(string,[wbits],[bufsize]) -- Decompresses a compressed string.
|
|
10
|
+
decompressobj([wbits[, zdict]]]) -- Return a decompressor object.
|
|
11
|
+
|
|
12
|
+
'wbits' is window buffer size and container format.
|
|
13
|
+
Compressor objects support compress() and flush() methods; decompressor
|
|
14
|
+
objects support decompress() and flush().
|
|
15
|
+
"""
|
|
16
|
+
|
|
1
17
|
import sys
|
|
2
18
|
from _typeshed import ReadableBuffer
|
|
3
19
|
from typing import Literal
|
|
@@ -40,17 +56,102 @@ class _Decompress:
|
|
|
40
56
|
def flush(self, length: int = ...) -> bytes: ...
|
|
41
57
|
def copy(self) -> _Decompress: ...
|
|
42
58
|
|
|
43
|
-
def adler32(data: ReadableBuffer, value: int = 1, /) -> int:
|
|
59
|
+
def adler32(data: ReadableBuffer, value: int = 1, /) -> int:
|
|
60
|
+
"""
|
|
61
|
+
Compute an Adler-32 checksum of data.
|
|
62
|
+
|
|
63
|
+
value
|
|
64
|
+
Starting value of the checksum.
|
|
65
|
+
|
|
66
|
+
The returned checksum is an integer.
|
|
67
|
+
"""
|
|
68
|
+
...
|
|
44
69
|
|
|
45
70
|
if sys.version_info >= (3, 11):
|
|
46
|
-
def compress(data: ReadableBuffer, /, level: int = -1, wbits: int = 15) -> bytes:
|
|
71
|
+
def compress(data: ReadableBuffer, /, level: int = -1, wbits: int = 15) -> bytes:
|
|
72
|
+
"""
|
|
73
|
+
Returns a bytes object containing compressed data.
|
|
74
|
+
|
|
75
|
+
data
|
|
76
|
+
Binary data to be compressed.
|
|
77
|
+
level
|
|
78
|
+
Compression level, in 0-9 or -1.
|
|
79
|
+
wbits
|
|
80
|
+
The window buffer size and container format.
|
|
81
|
+
"""
|
|
82
|
+
...
|
|
47
83
|
|
|
48
84
|
else:
|
|
49
|
-
def compress(data: ReadableBuffer, /, level: int = -1) -> bytes:
|
|
85
|
+
def compress(data: ReadableBuffer, /, level: int = -1) -> bytes:
|
|
86
|
+
"""
|
|
87
|
+
Returns a bytes object containing compressed data.
|
|
88
|
+
|
|
89
|
+
data
|
|
90
|
+
Binary data to be compressed.
|
|
91
|
+
level
|
|
92
|
+
Compression level, in 0-9 or -1.
|
|
93
|
+
"""
|
|
94
|
+
...
|
|
50
95
|
|
|
51
96
|
def compressobj(
|
|
52
97
|
level: int = -1, method: int = 8, wbits: int = 15, memLevel: int = 8, strategy: int = 0, zdict: ReadableBuffer | None = None
|
|
53
|
-
) -> _Compress:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
98
|
+
) -> _Compress:
|
|
99
|
+
"""
|
|
100
|
+
Return a compressor object.
|
|
101
|
+
|
|
102
|
+
level
|
|
103
|
+
The compression level (an integer in the range 0-9 or -1; default is
|
|
104
|
+
currently equivalent to 6). Higher compression levels are slower,
|
|
105
|
+
but produce smaller results.
|
|
106
|
+
method
|
|
107
|
+
The compression algorithm. If given, this must be DEFLATED.
|
|
108
|
+
wbits
|
|
109
|
+
+9 to +15: The base-two logarithm of the window size. Include a zlib
|
|
110
|
+
container.
|
|
111
|
+
-9 to -15: Generate a raw stream.
|
|
112
|
+
+25 to +31: Include a gzip container.
|
|
113
|
+
memLevel
|
|
114
|
+
Controls the amount of memory used for internal compression state.
|
|
115
|
+
Valid values range from 1 to 9. Higher values result in higher memory
|
|
116
|
+
usage, faster compression, and smaller output.
|
|
117
|
+
strategy
|
|
118
|
+
Used to tune the compression algorithm. Possible values are
|
|
119
|
+
Z_DEFAULT_STRATEGY, Z_FILTERED, and Z_HUFFMAN_ONLY.
|
|
120
|
+
zdict
|
|
121
|
+
The predefined compression dictionary - a sequence of bytes
|
|
122
|
+
containing subsequences that are likely to occur in the input data.
|
|
123
|
+
"""
|
|
124
|
+
...
|
|
125
|
+
def crc32(data: ReadableBuffer, value: int = 0, /) -> int:
|
|
126
|
+
"""
|
|
127
|
+
Compute a CRC-32 checksum of data.
|
|
128
|
+
|
|
129
|
+
value
|
|
130
|
+
Starting value of the checksum.
|
|
131
|
+
|
|
132
|
+
The returned checksum is an integer.
|
|
133
|
+
"""
|
|
134
|
+
...
|
|
135
|
+
def decompress(data: ReadableBuffer, /, wbits: int = 15, bufsize: int = 16384) -> bytes:
|
|
136
|
+
"""
|
|
137
|
+
Returns a bytes object containing the uncompressed data.
|
|
138
|
+
|
|
139
|
+
data
|
|
140
|
+
Compressed data.
|
|
141
|
+
wbits
|
|
142
|
+
The window buffer size and container format.
|
|
143
|
+
bufsize
|
|
144
|
+
The initial output buffer size.
|
|
145
|
+
"""
|
|
146
|
+
...
|
|
147
|
+
def decompressobj(wbits: int = 15, zdict: ReadableBuffer = b"") -> _Decompress:
|
|
148
|
+
"""
|
|
149
|
+
Return a decompressor object.
|
|
150
|
+
|
|
151
|
+
wbits
|
|
152
|
+
The window buffer size and container format.
|
|
153
|
+
zdict
|
|
154
|
+
The predefined compression dictionary. This must be the same
|
|
155
|
+
dictionary as used by the compressor that produced the input data.
|
|
156
|
+
"""
|
|
157
|
+
...
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "basedpyright",
|
|
3
3
|
"displayName": "basedpyright",
|
|
4
4
|
"description": "a pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.13.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "detachhead"
|