basedpyright 1.13.1 → 1.13.2
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/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +3 -1
- package/dist/typeshed-fallback/stdlib/_ast.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +221 -221
- package/dist/typeshed-fallback/stdlib/_csv.pyi +213 -213
- package/dist/typeshed-fallback/stdlib/_curses.pyi +1 -2
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_interpchannels.pyi +84 -0
- package/dist/typeshed-fallback/stdlib/_json.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +7 -0
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/argparse.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/array.pyi +281 -281
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +56 -37
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/asyncio/unix_events.pyi +156 -134
- package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/audioop.pyi +95 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +2 -5
- package/dist/typeshed-fallback/stdlib/math.pyi +424 -424
- package/dist/typeshed-fallback/stdlib/mmap.pyi +160 -154
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +10 -6
- package/dist/typeshed-fallback/stdlib/multiprocessing/sharedctypes.pyi +33 -12
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +3 -13
- package/dist/typeshed-fallback/stdlib/spwd.pyi +9 -0
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +8 -0
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +23 -1
- package/dist/typeshed-fallback/stdlib/telnetlib.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/typing.pyi +21 -2
- package/dist/typeshed-fallback/stdlib/weakref.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/zlib.pyi +157 -157
- package/dist/typeshed-fallback/stubs/Flask-SocketIO/flask_socketio/__init__.pyi +4 -4
- package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +6 -20
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +2 -0
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +5 -3
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/tempfile/__init__.pyi +143 -79
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/threadpool/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -1
- package/dist/typeshed-fallback/stubs/docker/docker/_types.pyi +8 -0
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +3 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/network.pyi +32 -15
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +36 -7
- package/dist/typeshed-fallback/stubs/docker/docker/models/images.pyi +67 -5
- package/dist/typeshed-fallback/stubs/docker/docker/models/networks.pyi +20 -3
- package/dist/typeshed-fallback/stubs/docker/docker/types/containers.pyi +78 -70
- package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +4 -7
- package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +16 -5
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi +2 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +4 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi +7 -7
- package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hdbcli/hdbcli/dbapi.pyi +1 -0
- package/dist/typeshed-fallback/stubs/hvac/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/raft.pyi +9 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/wrapping.pyi +1 -0
- package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/_pages.pyi +37 -0
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/bucket_api.pyi +5 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/tasks_api.pyi +4 -3
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/bucket.pyi +6 -6
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/task.pyi +6 -6
- package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +3 -1
- package/dist/typeshed-fallback/stubs/olefile/olefile/olefile.pyi +41 -31
- package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/rich_text.pyi +3 -0
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/chart/trendline.pyi +1 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/base.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/container.pyi +18 -0
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/descriptors/sequence.pyi +20 -12
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/custom.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/extended.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/relationship.pyi +6 -11
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/pivot/cache.pyi +66 -135
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/pivot/fields.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/alignment.pyi +0 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/borders.pyi +0 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/fills.pyi +3 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/named_styles.pyi +5 -10
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/utils/cell.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/utils/indexed_list.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/workbook/defined_name.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +11 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/datavalidation.pyi +2 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/dimensions.pyi +6 -3
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/filters.pyi +26 -22
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/hyperlink.pyi +3 -5
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/views.pyi +5 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +4 -2
- package/dist/typeshed-fallback/stubs/peewee/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +6 -1
- package/dist/typeshed-fallback/stubs/protobuf/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +84 -15
- package/dist/typeshed-fallback/stubs/psutil/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_common.pyi +0 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/_compat.pyi +0 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psaix.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psbsd.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pslinux.pyi +2 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psosx.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pssunos.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_psutil_osx.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyinstaller/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/__main__.pyi +1 -0
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +0 -2
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/compat.pyi +2 -3
- package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +3 -2
- package/dist/typeshed-fallback/stubs/requests/requests/models.pyi +2 -2
- package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +80 -50
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +2 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +6 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +3 -9
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +61 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_py.pyi +12 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/easy_install.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/egg_info.pyi +4 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +3 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py311.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +0 -1
- package/dist/typeshed-fallback/stubs/shapely/METADATA.toml +2 -1
- package/dist/typeshed-fallback/stubs/shapely/shapely/_geometry.pyi +3 -3
- package/dist/typeshed-fallback/stubs/shapely/shapely/constructive.pyi +6 -6
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/base.pyi +3 -3
- package/dist/typeshed-fallback/stubs/shapely/shapely/io.pyi +2 -2
- package/dist/typeshed-fallback/stubs/shapely/shapely/strtree.pyi +9 -9
- package/dist/typeshed-fallback/stubs/tree-sitter-languages/METADATA.toml +1 -1
- package/package.json +1 -1
- package/dist/typeshed-fallback/stubs/tree-sitter/METADATA.toml +0 -7
- package/dist/typeshed-fallback/stubs/tree-sitter/tree_sitter/__init__.pyi +0 -17
- package/dist/typeshed-fallback/stubs/tree-sitter/tree_sitter/binding.pyi +0 -115
|
@@ -41,7 +41,10 @@ _P = ParamSpec("_P")
|
|
|
41
41
|
ProxyTypes: tuple[type[Any], ...]
|
|
42
42
|
|
|
43
43
|
class WeakMethod(ref[_CallableT]):
|
|
44
|
-
|
|
44
|
+
# `ref` is implemented in `C` so positional-only arguments are enforced, but not in `WeakMethod`.
|
|
45
|
+
def __new__( # pyright: ignore[reportInconsistentConstructor]
|
|
46
|
+
cls, meth: _CallableT, callback: Callable[[Self], Any] | None = None
|
|
47
|
+
) -> Self: ...
|
|
45
48
|
def __call__(self) -> _CallableT | None: ...
|
|
46
49
|
def __eq__(self, other: object) -> bool: ...
|
|
47
50
|
def __ne__(self, other: object) -> bool: ...
|
|
@@ -14,7 +14,7 @@ class ContentHandler:
|
|
|
14
14
|
def startDocument(self) -> None: ...
|
|
15
15
|
def endDocument(self) -> None: ...
|
|
16
16
|
def startPrefixMapping(self, prefix: str | None, uri: str) -> None: ...
|
|
17
|
-
def endPrefixMapping(self, prefix) -> None: ...
|
|
17
|
+
def endPrefixMapping(self, prefix: str | None) -> None: ...
|
|
18
18
|
def startElement(self, name: str, attrs: xmlreader.AttributesImpl) -> None: ...
|
|
19
19
|
def endElement(self, name: str) -> None: ...
|
|
20
20
|
def startElementNS(self, name: tuple[str, str], qname: str, attrs: xmlreader.AttributesNSImpl) -> None: ...
|
|
@@ -1,157 +1,157 @@
|
|
|
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
|
-
|
|
17
|
-
import sys
|
|
18
|
-
from _typeshed import ReadableBuffer
|
|
19
|
-
from typing import Literal
|
|
20
|
-
|
|
21
|
-
DEFLATED: Literal[8]
|
|
22
|
-
DEF_MEM_LEVEL: int # can change
|
|
23
|
-
DEF_BUF_SIZE: Literal[16384]
|
|
24
|
-
MAX_WBITS: int
|
|
25
|
-
ZLIB_VERSION: str # can change
|
|
26
|
-
ZLIB_RUNTIME_VERSION: str # can change
|
|
27
|
-
Z_NO_COMPRESSION: Literal[0]
|
|
28
|
-
Z_PARTIAL_FLUSH: Literal[1]
|
|
29
|
-
Z_BEST_COMPRESSION: Literal[9]
|
|
30
|
-
Z_BEST_SPEED: Literal[1]
|
|
31
|
-
Z_BLOCK: Literal[5]
|
|
32
|
-
Z_DEFAULT_COMPRESSION: Literal[-1]
|
|
33
|
-
Z_DEFAULT_STRATEGY: Literal[0]
|
|
34
|
-
Z_FILTERED: Literal[1]
|
|
35
|
-
Z_FINISH: Literal[4]
|
|
36
|
-
Z_FIXED: Literal[4]
|
|
37
|
-
Z_FULL_FLUSH: Literal[3]
|
|
38
|
-
Z_HUFFMAN_ONLY: Literal[2]
|
|
39
|
-
Z_NO_FLUSH: Literal[0]
|
|
40
|
-
Z_RLE: Literal[3]
|
|
41
|
-
Z_SYNC_FLUSH: Literal[2]
|
|
42
|
-
Z_TREES: Literal[6]
|
|
43
|
-
|
|
44
|
-
class error(Exception): ...
|
|
45
|
-
|
|
46
|
-
class _Compress:
|
|
47
|
-
def compress(self, data: ReadableBuffer) -> bytes: ...
|
|
48
|
-
def flush(self, mode: int = ...) -> bytes: ...
|
|
49
|
-
def copy(self) -> _Compress: ...
|
|
50
|
-
|
|
51
|
-
class _Decompress:
|
|
52
|
-
unused_data: bytes
|
|
53
|
-
unconsumed_tail: bytes
|
|
54
|
-
eof: bool
|
|
55
|
-
def decompress(self, data: ReadableBuffer, max_length: int = ...) -> bytes: ...
|
|
56
|
-
def flush(self, length: int = ...) -> bytes: ...
|
|
57
|
-
def copy(self) -> _Decompress: ...
|
|
58
|
-
|
|
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
|
-
...
|
|
69
|
-
|
|
70
|
-
if sys.version_info >= (3, 11):
|
|
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
|
-
...
|
|
83
|
-
|
|
84
|
-
else:
|
|
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
|
-
...
|
|
95
|
-
|
|
96
|
-
def compressobj(
|
|
97
|
-
level: int = -1, method: int = 8, wbits: int = 15, memLevel: int = 8, strategy: int = 0, zdict: ReadableBuffer | None = None
|
|
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
|
-
...
|
|
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
|
+
|
|
17
|
+
import sys
|
|
18
|
+
from _typeshed import ReadableBuffer
|
|
19
|
+
from typing import Literal
|
|
20
|
+
|
|
21
|
+
DEFLATED: Literal[8]
|
|
22
|
+
DEF_MEM_LEVEL: int # can change
|
|
23
|
+
DEF_BUF_SIZE: Literal[16384]
|
|
24
|
+
MAX_WBITS: int
|
|
25
|
+
ZLIB_VERSION: str # can change
|
|
26
|
+
ZLIB_RUNTIME_VERSION: str # can change
|
|
27
|
+
Z_NO_COMPRESSION: Literal[0]
|
|
28
|
+
Z_PARTIAL_FLUSH: Literal[1]
|
|
29
|
+
Z_BEST_COMPRESSION: Literal[9]
|
|
30
|
+
Z_BEST_SPEED: Literal[1]
|
|
31
|
+
Z_BLOCK: Literal[5]
|
|
32
|
+
Z_DEFAULT_COMPRESSION: Literal[-1]
|
|
33
|
+
Z_DEFAULT_STRATEGY: Literal[0]
|
|
34
|
+
Z_FILTERED: Literal[1]
|
|
35
|
+
Z_FINISH: Literal[4]
|
|
36
|
+
Z_FIXED: Literal[4]
|
|
37
|
+
Z_FULL_FLUSH: Literal[3]
|
|
38
|
+
Z_HUFFMAN_ONLY: Literal[2]
|
|
39
|
+
Z_NO_FLUSH: Literal[0]
|
|
40
|
+
Z_RLE: Literal[3]
|
|
41
|
+
Z_SYNC_FLUSH: Literal[2]
|
|
42
|
+
Z_TREES: Literal[6]
|
|
43
|
+
|
|
44
|
+
class error(Exception): ...
|
|
45
|
+
|
|
46
|
+
class _Compress:
|
|
47
|
+
def compress(self, data: ReadableBuffer) -> bytes: ...
|
|
48
|
+
def flush(self, mode: int = ...) -> bytes: ...
|
|
49
|
+
def copy(self) -> _Compress: ...
|
|
50
|
+
|
|
51
|
+
class _Decompress:
|
|
52
|
+
unused_data: bytes
|
|
53
|
+
unconsumed_tail: bytes
|
|
54
|
+
eof: bool
|
|
55
|
+
def decompress(self, data: ReadableBuffer, max_length: int = ...) -> bytes: ...
|
|
56
|
+
def flush(self, length: int = ...) -> bytes: ...
|
|
57
|
+
def copy(self) -> _Decompress: ...
|
|
58
|
+
|
|
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
|
+
...
|
|
69
|
+
|
|
70
|
+
if sys.version_info >= (3, 11):
|
|
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
|
+
...
|
|
83
|
+
|
|
84
|
+
else:
|
|
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
|
+
...
|
|
95
|
+
|
|
96
|
+
def compressobj(
|
|
97
|
+
level: int = -1, method: int = 8, wbits: int = 15, memLevel: int = 8, strategy: int = 0, zdict: ReadableBuffer | None = None
|
|
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
|
+
...
|
|
@@ -7,8 +7,8 @@ from typing_extensions import ParamSpec, TypeAlias
|
|
|
7
7
|
from flask import Flask
|
|
8
8
|
from flask.testing import FlaskClient
|
|
9
9
|
|
|
10
|
-
from .namespace import Namespace
|
|
11
|
-
from .test_client import SocketIOTestClient
|
|
10
|
+
from .namespace import Namespace as Namespace
|
|
11
|
+
from .test_client import SocketIOTestClient as SocketIOTestClient
|
|
12
12
|
|
|
13
13
|
_P = ParamSpec("_P")
|
|
14
14
|
_R_co = TypeVar("_R_co", covariant=True)
|
|
@@ -96,9 +96,9 @@ class SocketIO:
|
|
|
96
96
|
port: int | None = None,
|
|
97
97
|
*,
|
|
98
98
|
debug: bool = True,
|
|
99
|
-
use_reloader: bool
|
|
99
|
+
use_reloader: bool = ...,
|
|
100
100
|
reloader_options: dict[str, Incomplete] = {},
|
|
101
|
-
log_output: bool
|
|
101
|
+
log_output: bool = ...,
|
|
102
102
|
allow_unsafe_werkzeug: bool = False,
|
|
103
103
|
**kwargs,
|
|
104
104
|
) -> None: ...
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
from collections.abc import
|
|
2
|
-
from
|
|
1
|
+
from collections.abc import Awaitable, Callable, Generator
|
|
2
|
+
from contextlib import AbstractAsyncContextManager
|
|
3
|
+
from types import TracebackType
|
|
3
4
|
from typing import Any, BinaryIO, Generic, TextIO, TypeVar
|
|
4
5
|
from typing_extensions import Self
|
|
5
6
|
|
|
6
7
|
_T = TypeVar("_T")
|
|
7
|
-
_T_co = TypeVar("_T_co", covariant=True)
|
|
8
8
|
_V_co = TypeVar("_V_co", covariant=True)
|
|
9
|
-
_T_contra = TypeVar("_T_contra", contravariant=True)
|
|
10
9
|
|
|
11
10
|
class AsyncBase(Generic[_T]):
|
|
12
11
|
def __init__(self, file: str, loop: Any, executor: Any) -> None: ...
|
|
@@ -16,22 +15,9 @@ class AsyncBase(Generic[_T]):
|
|
|
16
15
|
class AsyncIndirectBase(AsyncBase[_T]):
|
|
17
16
|
def __init__(self, name: str, loop: Any, executor: Any, indirect: Callable[[], TextIO | BinaryIO]) -> None: ...
|
|
18
17
|
|
|
19
|
-
class AiofilesContextManager(
|
|
20
|
-
def __init__(self, coro:
|
|
21
|
-
def
|
|
22
|
-
def throw(self, typ: type[BaseException], val: BaseException | object = None, tb: TracebackType | None = None) -> _T_co: ...
|
|
23
|
-
def close(self) -> None: ...
|
|
24
|
-
@property
|
|
25
|
-
def gi_frame(self) -> FrameType: ...
|
|
26
|
-
@property
|
|
27
|
-
def gi_running(self) -> bool: ...
|
|
28
|
-
@property
|
|
29
|
-
def gi_code(self) -> CodeType: ...
|
|
30
|
-
def __next__(self) -> _T_co: ...
|
|
31
|
-
@coroutine
|
|
32
|
-
def __iter__(self) -> Iterator[Coroutine[_T_co, _T_contra, _V_co]]: ...
|
|
33
|
-
def __await__(self) -> Generator[Any, None, _V_co]: ...
|
|
34
|
-
async def __anext__(self) -> _V_co: ...
|
|
18
|
+
class AiofilesContextManager(Awaitable[_V_co], AbstractAsyncContextManager[_V_co]):
|
|
19
|
+
def __init__(self, coro: Awaitable[_V_co]) -> None: ...
|
|
20
|
+
def __await__(self) -> Generator[Any, Any, _V_co]: ...
|
|
35
21
|
async def __aenter__(self) -> _V_co: ...
|
|
36
22
|
async def __aexit__(
|
|
37
23
|
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
|
@@ -27,6 +27,7 @@ __all__ = [
|
|
|
27
27
|
"scandir",
|
|
28
28
|
"access",
|
|
29
29
|
"wrap",
|
|
30
|
+
"getcwd",
|
|
30
31
|
]
|
|
31
32
|
|
|
32
33
|
if sys.platform != "win32":
|
|
@@ -118,6 +119,7 @@ async def listdir(path: int, *, loop: AbstractEventLoop | None = ..., executor:
|
|
|
118
119
|
async def access(
|
|
119
120
|
path: FileDescriptorOrPath, mode: int, *, dir_fd: int | None = None, effective_ids: bool = False, follow_symlinks: bool = True
|
|
120
121
|
) -> bool: ...
|
|
122
|
+
async def getcwd() -> str: ...
|
|
121
123
|
|
|
122
124
|
if sys.platform != "win32":
|
|
123
125
|
from os import statvfs_result
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
from _typeshed import FileDescriptorOrPath
|
|
2
2
|
from asyncio.events import AbstractEventLoop
|
|
3
3
|
from collections.abc import Awaitable, Callable
|
|
4
|
-
from
|
|
4
|
+
from os import PathLike
|
|
5
|
+
from typing import Any, AnyStr, TypeVar
|
|
5
6
|
|
|
6
7
|
_R = TypeVar("_R")
|
|
7
8
|
|
|
@@ -9,6 +10,8 @@ def wrap(func: Callable[..., _R]) -> Callable[..., Awaitable[_R]]: ...
|
|
|
9
10
|
async def exists(path: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
|
10
11
|
async def isfile(path: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
|
11
12
|
async def isdir(s: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
|
13
|
+
async def islink(path: FileDescriptorOrPath) -> bool: ...
|
|
14
|
+
async def ismount(path: FileDescriptorOrPath) -> bool: ...
|
|
12
15
|
async def getsize(filename: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> int: ...
|
|
13
16
|
async def getmtime(filename: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> float: ...
|
|
14
17
|
async def getatime(filename: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> float: ...
|
|
@@ -17,5 +20,4 @@ async def samefile(
|
|
|
17
20
|
f1: FileDescriptorOrPath, f2: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
|
18
21
|
) -> bool: ...
|
|
19
22
|
async def sameopenfile(fp1: int, fp2: int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
|
20
|
-
async def
|
|
21
|
-
async def ismount(path: FileDescriptorOrPath) -> bool: ...
|
|
23
|
+
async def abspath(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ...
|