basedpyright 1.13.2 → 1.13.3
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 +2 -0
- package/dist/typeshed-fallback/stdlib/_ast.pyi +42 -279
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +221 -221
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +15 -5
- package/dist/typeshed-fallback/stdlib/_csv.pyi +213 -213
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +0 -18
- package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +180 -164
- package/dist/typeshed-fallback/stdlib/_heapq.pyi +67 -67
- package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +16 -0
- package/dist/typeshed-fallback/stdlib/_interpreters.pyi +50 -0
- package/dist/typeshed-fallback/stdlib/_json.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_lsprof.pyi +92 -92
- package/dist/typeshed-fallback/stdlib/_msi.pyi +94 -92
- package/dist/typeshed-fallback/stdlib/_operator.pyi +0 -24
- package/dist/typeshed-fallback/stdlib/_random.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/abc.pyi +12 -4
- package/dist/typeshed-fallback/stdlib/argparse.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/array.pyi +281 -281
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +35 -4
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +107 -15
- package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +9 -3
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +10 -2
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +23 -4
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +107 -12
- package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/asyncio/windows_utils.pyi +49 -49
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/audioop.pyi +95 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/builtins.pyi +0 -1
- package/dist/typeshed-fallback/stdlib/bz2.pyi +59 -6
- package/dist/typeshed-fallback/stdlib/cmath.pyi +112 -112
- package/dist/typeshed-fallback/stdlib/codecs.pyi +18 -6
- package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +200 -56
- package/dist/typeshed-fallback/stdlib/concurrent/futures/__init__.pyi +33 -14
- package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/contextvars.pyi +99 -16
- package/dist/typeshed-fallback/stdlib/csv.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/ctypes/_endian.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/curses/panel.pyi +16 -4
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/datetime.pyi +346 -104
- package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +52 -2
- package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +26 -2
- package/dist/typeshed-fallback/stdlib/difflib.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +35 -35
- package/dist/typeshed-fallback/stdlib/distutils/bcppcompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +173 -173
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +99 -99
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +44 -44
- package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +39 -39
- package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +65 -65
- package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +44 -44
- package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +23 -23
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +149 -149
- package/dist/typeshed-fallback/stdlib/distutils/errors.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/extension.pyi +36 -36
- package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +38 -38
- package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/log.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/unixccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/util.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +38 -36
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/_header_value_parser.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/email/charset.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/email/header.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +6 -1
- package/dist/typeshed-fallback/stdlib/enum.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/filecmp.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/fileinput.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/fractions.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/functools.pyi +65 -13
- package/dist/typeshed-fallback/stdlib/graphlib.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/hashlib.pyi +42 -14
- package/dist/typeshed-fallback/stdlib/heapq.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/hmac.pyi +30 -2
- package/dist/typeshed-fallback/stdlib/http/cookies.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/importlib/machinery.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +79 -15
- package/dist/typeshed-fallback/stdlib/importlib/metadata/_meta.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/importlib/resources/simple.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/io.pyi +428 -44
- package/dist/typeshed-fallback/stdlib/ipaddress.pyi +153 -28
- package/dist/typeshed-fallback/stdlib/itertools.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/json/encoder.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/keyword.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +17 -3
- package/dist/typeshed-fallback/stdlib/lzma.pyi +107 -9
- package/dist/typeshed-fallback/stdlib/mailbox.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/math.pyi +424 -424
- package/dist/typeshed-fallback/stdlib/mmap.pyi +160 -160
- package/dist/typeshed-fallback/stdlib/msilib/__init__.pyi +177 -177
- package/dist/typeshed-fallback/stdlib/msilib/schema.pyi +94 -94
- package/dist/typeshed-fallback/stdlib/msilib/sequence.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/msilib/text.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +9 -3
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +10 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/multiprocessing/process.pyi +15 -4
- package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +19 -5
- package/dist/typeshed-fallback/stdlib/nis.pyi +31 -4
- package/dist/typeshed-fallback/stdlib/numbers.pyi +26 -6
- package/dist/typeshed-fallback/stdlib/opcode.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/optparse.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1447 -217
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +42 -11
- package/dist/typeshed-fallback/stdlib/pickle.pyi +200 -12
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/queue.pyi +57 -9
- package/dist/typeshed-fallback/stdlib/re.pyi +219 -57
- package/dist/typeshed-fallback/stdlib/sched.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/signal.pyi +95 -19
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/socket.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +417 -83
- package/dist/typeshed-fallback/stdlib/ssl.pyi +133 -22
- package/dist/typeshed-fallback/stdlib/statistics.pyi +20 -5
- package/dist/typeshed-fallback/stdlib/struct.pyi +114 -13
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/symtable.pyi +30 -1
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +7 -3
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/tempfile.pyi +17 -3
- package/dist/typeshed-fallback/stdlib/threading.pyi +68 -7
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/turtle.pyi +11 -3
- package/dist/typeshed-fallback/stdlib/types.pyi +306 -79
- package/dist/typeshed-fallback/stdlib/typing.pyi +310 -31
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +42 -11
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +6 -1
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +51 -3
- package/dist/typeshed-fallback/stdlib/weakref.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/winsound.pyi +44 -28
- package/dist/typeshed-fallback/stdlib/xml/dom/minicompat.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +33 -11
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +30 -10
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/errors.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/model.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +19 -4
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +31 -0
- package/dist/typeshed-fallback/stdlib/zlib.pyi +157 -157
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +18 -6
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/_types.pyi +18 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +5 -19
- package/dist/typeshed-fallback/stubs/docker/docker/api/daemon.pyi +2 -1
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +268 -6
- package/dist/typeshed-fallback/stubs/docker/docker/types/containers.pyi +3 -7
- package/dist/typeshed-fallback/stubs/docker/docker/types/daemon.pyi +10 -4
- package/dist/typeshed-fallback/stubs/docutils/docutils/parsers/rst/states.pyi +47 -0
- package/dist/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/packaging/extended.pyi +0 -2
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/named_styles.pyi +2 -1
- package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pytest-lazy-fixture/pytest_lazyfixture.pyi +2 -2
- package/dist/typeshed-fallback/stubs/python-crontab/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi +23 -11
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi +6 -0
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +8 -8
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +11 -17
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +11 -11
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +1 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +4 -12
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +2 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +5 -8
- package/dist/typeshed-fallback/stubs/str2bool/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/str2bool/str2bool/__init__.pyi +7 -0
- package/package.json +1 -1
|
@@ -329,7 +329,13 @@ class _AssertRaisesContext(_AssertRaisesBaseContext, Generic[_E]):
|
|
|
329
329
|
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None
|
|
330
330
|
) -> bool: ...
|
|
331
331
|
if sys.version_info >= (3, 9):
|
|
332
|
-
def __class_getitem__(cls, item: Any, /) -> GenericAlias:
|
|
332
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias:
|
|
333
|
+
"""
|
|
334
|
+
Represent a PEP 585 generic type
|
|
335
|
+
|
|
336
|
+
E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
|
|
337
|
+
"""
|
|
338
|
+
...
|
|
333
339
|
|
|
334
340
|
class _AssertWarnsContext(_AssertRaisesBaseContext):
|
|
335
341
|
warning: WarningMessage
|
|
@@ -65,7 +65,9 @@ class _Call(tuple[Any, ...]):
|
|
|
65
65
|
from_kall: bool = True,
|
|
66
66
|
) -> None: ...
|
|
67
67
|
def __eq__(self, other: object) -> bool: ...
|
|
68
|
-
def __ne__(self, value: object, /) -> bool:
|
|
68
|
+
def __ne__(self, value: object, /) -> bool:
|
|
69
|
+
"""Return self!=value."""
|
|
70
|
+
...
|
|
69
71
|
def __call__(self, *args: Any, **kwargs: Any) -> _Call: ...
|
|
70
72
|
def __getattr__(self, attr: str) -> Any: ...
|
|
71
73
|
def __getattribute__(self, attr: str) -> Any: ...
|
|
@@ -56,7 +56,13 @@ class _NetlocResultMixinBase(Generic[AnyStr]):
|
|
|
56
56
|
@property
|
|
57
57
|
def port(self) -> int | None: ...
|
|
58
58
|
if sys.version_info >= (3, 9):
|
|
59
|
-
def __class_getitem__(cls, item: Any, /) -> GenericAlias:
|
|
59
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias:
|
|
60
|
+
"""
|
|
61
|
+
Represent a PEP 585 generic type
|
|
62
|
+
|
|
63
|
+
E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
|
|
64
|
+
"""
|
|
65
|
+
...
|
|
60
66
|
|
|
61
67
|
class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ...
|
|
62
68
|
class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ...
|
|
@@ -182,13 +188,55 @@ def urlparse(
|
|
|
182
188
|
url: bytes | bytearray | None, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True
|
|
183
189
|
) -> ParseResultBytes: ...
|
|
184
190
|
@overload
|
|
185
|
-
def urlsplit(url: str, scheme: str = "", allow_fragments: bool = True) -> SplitResult:
|
|
191
|
+
def urlsplit(url: str, scheme: str = "", allow_fragments: bool = True) -> SplitResult:
|
|
192
|
+
"""
|
|
193
|
+
Parse a URL into 5 components:
|
|
194
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
195
|
+
|
|
196
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
197
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
198
|
+
depending on the type of the url parameter.
|
|
199
|
+
|
|
200
|
+
The username, password, hostname, and port sub-components of netloc
|
|
201
|
+
can also be accessed as attributes of the returned object.
|
|
202
|
+
|
|
203
|
+
The scheme argument provides the default value of the scheme
|
|
204
|
+
component when no scheme is found in url.
|
|
205
|
+
|
|
206
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
207
|
+
fragment component from the previous component, which can be either
|
|
208
|
+
path or query.
|
|
209
|
+
|
|
210
|
+
Note that % escapes are not expanded.
|
|
211
|
+
"""
|
|
212
|
+
...
|
|
186
213
|
|
|
187
214
|
if sys.version_info >= (3, 11):
|
|
188
215
|
@overload
|
|
189
216
|
def urlsplit(
|
|
190
217
|
url: bytes | None, scheme: bytes | None | Literal[""] = "", allow_fragments: bool = True
|
|
191
|
-
) -> SplitResultBytes:
|
|
218
|
+
) -> SplitResultBytes:
|
|
219
|
+
"""
|
|
220
|
+
Parse a URL into 5 components:
|
|
221
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
222
|
+
|
|
223
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
224
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
225
|
+
depending on the type of the url parameter.
|
|
226
|
+
|
|
227
|
+
The username, password, hostname, and port sub-components of netloc
|
|
228
|
+
can also be accessed as attributes of the returned object.
|
|
229
|
+
|
|
230
|
+
The scheme argument provides the default value of the scheme
|
|
231
|
+
component when no scheme is found in url.
|
|
232
|
+
|
|
233
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
234
|
+
fragment component from the previous component, which can be either
|
|
235
|
+
path or query.
|
|
236
|
+
|
|
237
|
+
Note that % escapes are not expanded.
|
|
238
|
+
"""
|
|
239
|
+
...
|
|
192
240
|
|
|
193
241
|
else:
|
|
194
242
|
@overload
|
|
@@ -48,7 +48,9 @@ class WeakMethod(ref[_CallableT]):
|
|
|
48
48
|
def __call__(self) -> _CallableT | None: ...
|
|
49
49
|
def __eq__(self, other: object) -> bool: ...
|
|
50
50
|
def __ne__(self, other: object) -> bool: ...
|
|
51
|
-
def __hash__(self) -> int:
|
|
51
|
+
def __hash__(self) -> int:
|
|
52
|
+
"""Return hash(self)."""
|
|
53
|
+
...
|
|
52
54
|
|
|
53
55
|
class WeakValueDictionary(MutableMapping[_KT, _VT]):
|
|
54
56
|
@overload
|
|
@@ -155,5 +157,7 @@ class finalize: # TODO: This is a good candidate for to be a `Generic[_P, _T]`
|
|
|
155
157
|
def detach(self) -> tuple[Any, Any, tuple[Any, ...], dict[str, Any]] | None: ...
|
|
156
158
|
def peek(self) -> tuple[Any, Any, tuple[Any, ...], dict[str, Any]] | None: ...
|
|
157
159
|
@property
|
|
158
|
-
def alive(self) -> bool:
|
|
160
|
+
def alive(self) -> bool:
|
|
161
|
+
"""Whether finalizer is alive"""
|
|
162
|
+
...
|
|
159
163
|
atexit: bool
|
|
@@ -1,28 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
"""
|
|
2
|
+
PlaySound(sound, flags) - play a sound
|
|
3
|
+
SND_FILENAME - sound is a wav file name
|
|
4
|
+
SND_ALIAS - sound is a registry sound association name
|
|
5
|
+
SND_LOOP - Play the sound repeatedly; must also specify SND_ASYNC
|
|
6
|
+
SND_MEMORY - sound is a memory image of a wav file
|
|
7
|
+
SND_PURGE - stop all instances of the specified sound
|
|
8
|
+
SND_ASYNC - PlaySound returns immediately
|
|
9
|
+
SND_NODEFAULT - Do not play a default beep if the sound can not be found
|
|
10
|
+
SND_NOSTOP - Do not interrupt any sounds currently playing
|
|
11
|
+
SND_NOWAIT - Return immediately if the sound driver is busy
|
|
12
|
+
|
|
13
|
+
Beep(frequency, duration) - Make a beep through the PC speaker.
|
|
14
|
+
MessageBeep(type) - Call Windows MessageBeep.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import sys
|
|
18
|
+
from _typeshed import ReadableBuffer
|
|
19
|
+
from typing import Literal, overload
|
|
20
|
+
|
|
21
|
+
if sys.platform == "win32":
|
|
22
|
+
SND_APPLICATION: Literal[128]
|
|
23
|
+
SND_FILENAME: Literal[131072]
|
|
24
|
+
SND_ALIAS: Literal[65536]
|
|
25
|
+
SND_LOOP: Literal[8]
|
|
26
|
+
SND_MEMORY: Literal[4]
|
|
27
|
+
SND_PURGE: Literal[64]
|
|
28
|
+
SND_ASYNC: Literal[1]
|
|
29
|
+
SND_NODEFAULT: Literal[2]
|
|
30
|
+
SND_NOSTOP: Literal[16]
|
|
31
|
+
SND_NOWAIT: Literal[8192]
|
|
32
|
+
|
|
33
|
+
MB_ICONASTERISK: Literal[64]
|
|
34
|
+
MB_ICONEXCLAMATION: Literal[48]
|
|
35
|
+
MB_ICONHAND: Literal[16]
|
|
36
|
+
MB_ICONQUESTION: Literal[32]
|
|
37
|
+
MB_OK: Literal[0]
|
|
38
|
+
def Beep(frequency: int, duration: int) -> None: ...
|
|
39
|
+
# Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible
|
|
40
|
+
@overload
|
|
41
|
+
def PlaySound(sound: ReadableBuffer | None, flags: Literal[4]) -> None: ...
|
|
42
|
+
@overload
|
|
43
|
+
def PlaySound(sound: str | ReadableBuffer | None, flags: int) -> None: ...
|
|
44
|
+
def MessageBeep(type: int = 0) -> None: ...
|
|
@@ -9,12 +9,16 @@ StringTypes: tuple[type[str]]
|
|
|
9
9
|
|
|
10
10
|
class NodeList(list[_T]):
|
|
11
11
|
@property
|
|
12
|
-
def length(self) -> int:
|
|
12
|
+
def length(self) -> int:
|
|
13
|
+
"""The number of nodes in the NodeList."""
|
|
14
|
+
...
|
|
13
15
|
def item(self, index: int) -> _T | None: ...
|
|
14
16
|
|
|
15
17
|
class EmptyNodeList(tuple[()]):
|
|
16
18
|
@property
|
|
17
|
-
def length(self) -> Literal[0]:
|
|
19
|
+
def length(self) -> Literal[0]:
|
|
20
|
+
"""The number of nodes in the NodeList."""
|
|
21
|
+
...
|
|
18
22
|
def item(self, index: int) -> None: ...
|
|
19
23
|
def __add__(self, other: Iterable[_T]) -> NodeList[_T]: ... # type: ignore[override]
|
|
20
24
|
def __radd__(self, other: Iterable[_T]) -> NodeList[_T]: ...
|
|
@@ -23,11 +23,17 @@ class Node(xml.dom.Node):
|
|
|
23
23
|
previousSibling: Incomplete
|
|
24
24
|
prefix: Incomplete
|
|
25
25
|
@property
|
|
26
|
-
def firstChild(self) -> Node | None:
|
|
26
|
+
def firstChild(self) -> Node | None:
|
|
27
|
+
"""First child node, or None."""
|
|
28
|
+
...
|
|
27
29
|
@property
|
|
28
|
-
def lastChild(self) -> Node | None:
|
|
30
|
+
def lastChild(self) -> Node | None:
|
|
31
|
+
"""Last child node, or None."""
|
|
32
|
+
...
|
|
29
33
|
@property
|
|
30
|
-
def localName(self) -> str | None:
|
|
34
|
+
def localName(self) -> str | None:
|
|
35
|
+
"""Namespace-local name of this node."""
|
|
36
|
+
...
|
|
31
37
|
def __bool__(self) -> Literal[True]: ...
|
|
32
38
|
if sys.version_info >= (3, 9):
|
|
33
39
|
@overload
|
|
@@ -137,9 +143,13 @@ class Attr(Node):
|
|
|
137
143
|
) -> None: ...
|
|
138
144
|
def unlink(self) -> None: ...
|
|
139
145
|
@property
|
|
140
|
-
def isId(self) -> bool:
|
|
146
|
+
def isId(self) -> bool:
|
|
147
|
+
"""True if this attribute is an ID."""
|
|
148
|
+
...
|
|
141
149
|
@property
|
|
142
|
-
def schemaType(self):
|
|
150
|
+
def schemaType(self):
|
|
151
|
+
"""Schema type for this attribute."""
|
|
152
|
+
...
|
|
143
153
|
|
|
144
154
|
class NamedNodeMap:
|
|
145
155
|
def __init__(self, attrs, attrsNS, ownerElement) -> None: ...
|
|
@@ -167,7 +177,9 @@ class NamedNodeMap:
|
|
|
167
177
|
def setNamedItemNS(self, node: Attr) -> Attr: ...
|
|
168
178
|
def __delitem__(self, attname_or_tuple: tuple[str, str | None] | str) -> None: ...
|
|
169
179
|
@property
|
|
170
|
-
def length(self) -> int:
|
|
180
|
+
def length(self) -> int:
|
|
181
|
+
"""Number of nodes in the NamedNodeMap."""
|
|
182
|
+
...
|
|
171
183
|
|
|
172
184
|
AttributeList = NamedNodeMap
|
|
173
185
|
|
|
@@ -213,7 +225,9 @@ class Element(Node):
|
|
|
213
225
|
def setIdAttributeNS(self, namespaceURI: str, localName) -> None: ...
|
|
214
226
|
def setIdAttributeNode(self, idAttr) -> None: ...
|
|
215
227
|
@property
|
|
216
|
-
def attributes(self) -> NamedNodeMap:
|
|
228
|
+
def attributes(self) -> NamedNodeMap:
|
|
229
|
+
"""NamedNodeMap of attributes on the element."""
|
|
230
|
+
...
|
|
217
231
|
|
|
218
232
|
class Childless:
|
|
219
233
|
attributes: Incomplete
|
|
@@ -249,7 +263,9 @@ class CharacterData(Childless, Node):
|
|
|
249
263
|
def deleteData(self, offset: int, count: int) -> None: ...
|
|
250
264
|
def replaceData(self, offset: int, count: int, arg: str) -> None: ...
|
|
251
265
|
@property
|
|
252
|
-
def length(self) -> int:
|
|
266
|
+
def length(self) -> int:
|
|
267
|
+
"""Length of the string data."""
|
|
268
|
+
...
|
|
253
269
|
|
|
254
270
|
class Text(CharacterData):
|
|
255
271
|
nodeType: int
|
|
@@ -260,9 +276,13 @@ class Text(CharacterData):
|
|
|
260
276
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
261
277
|
def replaceWholeText(self, content) -> Self | None: ...
|
|
262
278
|
@property
|
|
263
|
-
def isWhitespaceInElementContent(self) -> bool:
|
|
279
|
+
def isWhitespaceInElementContent(self) -> bool:
|
|
280
|
+
"""True iff this text node contains only whitespace and is in element content."""
|
|
281
|
+
...
|
|
264
282
|
@property
|
|
265
|
-
def wholeText(self) -> str:
|
|
283
|
+
def wholeText(self) -> str:
|
|
284
|
+
"""The text of all logically-adjacent text nodes."""
|
|
285
|
+
...
|
|
266
286
|
|
|
267
287
|
class Comment(CharacterData):
|
|
268
288
|
nodeType: int
|
|
@@ -287,7 +307,9 @@ class ReadOnlySequentialNamedNodeMap:
|
|
|
287
307
|
def setNamedItem(self, node) -> None: ...
|
|
288
308
|
def setNamedItemNS(self, node) -> None: ...
|
|
289
309
|
@property
|
|
290
|
-
def length(self) -> int:
|
|
310
|
+
def length(self) -> int:
|
|
311
|
+
"""Number of entries in the NamedNodeMap."""
|
|
312
|
+
...
|
|
291
313
|
|
|
292
314
|
class Identified:
|
|
293
315
|
publicId: Incomplete
|
|
@@ -109,22 +109,36 @@ class Element:
|
|
|
109
109
|
def set(self, key: str, value: str, /) -> None: ...
|
|
110
110
|
def __copy__(self) -> Element: ... # returns the type of self in Python impl, but not in C impl
|
|
111
111
|
def __deepcopy__(self, memo: Any, /) -> Element: ... # Only exists in C impl
|
|
112
|
-
def __delitem__(self, key: SupportsIndex | slice, /) -> None:
|
|
112
|
+
def __delitem__(self, key: SupportsIndex | slice, /) -> None:
|
|
113
|
+
"""Delete self[key]."""
|
|
114
|
+
...
|
|
113
115
|
@overload
|
|
114
|
-
def __getitem__(self, key: SupportsIndex, /) -> Element:
|
|
116
|
+
def __getitem__(self, key: SupportsIndex, /) -> Element:
|
|
117
|
+
"""Return self[key]."""
|
|
118
|
+
...
|
|
115
119
|
@overload
|
|
116
|
-
def __getitem__(self, key: slice, /) -> list[Element]:
|
|
117
|
-
|
|
120
|
+
def __getitem__(self, key: slice, /) -> list[Element]:
|
|
121
|
+
"""Return self[key]."""
|
|
122
|
+
...
|
|
123
|
+
def __len__(self) -> int:
|
|
124
|
+
"""Return len(self)."""
|
|
125
|
+
...
|
|
118
126
|
# Doesn't actually exist at runtime, but instance of the class are indeed iterable due to __getitem__.
|
|
119
127
|
def __iter__(self) -> Iterator[Element]: ...
|
|
120
128
|
@overload
|
|
121
|
-
def __setitem__(self, key: SupportsIndex, value: Element, /) -> None:
|
|
129
|
+
def __setitem__(self, key: SupportsIndex, value: Element, /) -> None:
|
|
130
|
+
"""Set self[key] to value."""
|
|
131
|
+
...
|
|
122
132
|
@overload
|
|
123
|
-
def __setitem__(self, key: slice, value: Iterable[Element], /) -> None:
|
|
133
|
+
def __setitem__(self, key: slice, value: Iterable[Element], /) -> None:
|
|
134
|
+
"""Set self[key] to value."""
|
|
135
|
+
...
|
|
124
136
|
|
|
125
137
|
# Doesn't really exist in earlier versions, where __len__ is called implicitly instead
|
|
126
138
|
@deprecated("Testing an element's truth value is deprecated.")
|
|
127
|
-
def __bool__(self) -> bool:
|
|
139
|
+
def __bool__(self) -> bool:
|
|
140
|
+
"""True if self else False"""
|
|
141
|
+
...
|
|
128
142
|
if sys.version_info < (3, 9):
|
|
129
143
|
def getchildren(self) -> list[Element]: ...
|
|
130
144
|
def getiterator(self, tag: str | None = None) -> list[Element]: ...
|
|
@@ -239,9 +253,15 @@ if sys.version_info >= (3, 9):
|
|
|
239
253
|
def indent(tree: Element | ElementTree, space: str = " ", level: int = 0) -> None: ...
|
|
240
254
|
|
|
241
255
|
def parse(source: _FileRead, parser: XMLParser | None = None) -> ElementTree: ...
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
) ->
|
|
256
|
+
|
|
257
|
+
class _IterParseIterator(Iterator[tuple[str, Any]]):
|
|
258
|
+
def __next__(self) -> tuple[str, Any]: ...
|
|
259
|
+
if sys.version_info >= (3, 13):
|
|
260
|
+
def close(self) -> None: ...
|
|
261
|
+
if sys.version_info >= (3, 11):
|
|
262
|
+
def __del__(self) -> None: ...
|
|
263
|
+
|
|
264
|
+
def iterparse(source: _FileRead, events: Sequence[str] | None = None, parser: XMLParser | None = None) -> _IterParseIterator: ...
|
|
245
265
|
|
|
246
266
|
class XMLPullParser:
|
|
247
267
|
def __init__(self, events: Sequence[str] | None = None, *, _parser: XMLParser | None = None) -> None: ...
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"""This is a template module just for instruction."""
|
|
2
|
+
|
|
1
3
|
import sys
|
|
2
4
|
from typing import Any, final
|
|
3
5
|
|
|
@@ -5,12 +7,23 @@ class Str(str): ...
|
|
|
5
7
|
|
|
6
8
|
@final
|
|
7
9
|
class Xxo:
|
|
8
|
-
|
|
10
|
+
"""A class that explicitly stores attributes in an internal dict"""
|
|
11
|
+
def demo(self) -> None:
|
|
12
|
+
"""demo(o) -> o"""
|
|
13
|
+
...
|
|
9
14
|
if sys.version_info >= (3, 11) and sys.platform != "win32":
|
|
10
15
|
x_exports: int
|
|
11
16
|
|
|
12
|
-
def foo(i: int, j: int, /) -> Any:
|
|
13
|
-
|
|
17
|
+
def foo(i: int, j: int, /) -> Any:
|
|
18
|
+
"""
|
|
19
|
+
foo(i,j)
|
|
20
|
+
|
|
21
|
+
Return the sum of i and j.
|
|
22
|
+
"""
|
|
23
|
+
...
|
|
24
|
+
def new() -> Xxo:
|
|
25
|
+
"""new() -> new Xx object"""
|
|
26
|
+
...
|
|
14
27
|
|
|
15
28
|
if sys.version_info >= (3, 10):
|
|
16
29
|
class Error(Exception): ...
|
|
@@ -19,4 +32,6 @@ else:
|
|
|
19
32
|
class error(Exception): ...
|
|
20
33
|
class Null: ...
|
|
21
34
|
|
|
22
|
-
def roj(b: Any, /) -> None:
|
|
35
|
+
def roj(b: Any, /) -> None:
|
|
36
|
+
"""roj(a,b) -> None"""
|
|
37
|
+
...
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
zipimport provides support for importing Python modules from Zip archives.
|
|
3
|
+
|
|
4
|
+
This module exports three objects:
|
|
5
|
+
- zipimporter: a class; its constructor takes a path to a Zip archive.
|
|
6
|
+
- ZipImportError: exception raised by zipimporter objects. It's a
|
|
7
|
+
subclass of ImportError, so it can be caught as ImportError, too.
|
|
8
|
+
- _zip_directory_cache: a dict, mapping archive paths to zip directory
|
|
9
|
+
info dicts, as used in zipimporter._files.
|
|
10
|
+
|
|
11
|
+
It is usually not needed to use the zipimport module explicitly; it is
|
|
12
|
+
used by the builtin import mechanism for sys.path items that are paths
|
|
13
|
+
to Zip archives.
|
|
14
|
+
"""
|
|
15
|
+
|
|
1
16
|
import sys
|
|
2
17
|
from _typeshed import StrOrBytesPath
|
|
3
18
|
from importlib.abc import ResourceReader
|
|
@@ -9,6 +24,20 @@ __all__ = ["ZipImportError", "zipimporter"]
|
|
|
9
24
|
class ZipImportError(ImportError): ...
|
|
10
25
|
|
|
11
26
|
class zipimporter:
|
|
27
|
+
"""
|
|
28
|
+
zipimporter(archivepath) -> zipimporter object
|
|
29
|
+
|
|
30
|
+
Create a new zipimporter instance. 'archivepath' must be a path to
|
|
31
|
+
a zipfile, or to a specific path inside a zipfile. For example, it can be
|
|
32
|
+
'/tmp/myimport.zip', or '/tmp/myimport.zip/mydirectory', if mydirectory is a
|
|
33
|
+
valid directory inside the archive.
|
|
34
|
+
|
|
35
|
+
'ZipImportError is raised if 'archivepath' doesn't point to a valid Zip
|
|
36
|
+
archive.
|
|
37
|
+
|
|
38
|
+
The 'archive' attribute of zipimporter objects contains the name of the
|
|
39
|
+
zipfile targeted.
|
|
40
|
+
"""
|
|
12
41
|
archive: str
|
|
13
42
|
prefix: str
|
|
14
43
|
if sys.version_info >= (3, 11):
|
|
@@ -28,5 +57,7 @@ class zipimporter:
|
|
|
28
57
|
def is_package(self, fullname: str) -> bool: ...
|
|
29
58
|
def load_module(self, fullname: str) -> ModuleType: ...
|
|
30
59
|
if sys.version_info >= (3, 10):
|
|
60
|
+
def exec_module(self, module: ModuleType) -> None: ...
|
|
61
|
+
def create_module(self, spec: ModuleSpec) -> None: ...
|
|
31
62
|
def find_spec(self, fullname: str, target: ModuleType | None = None) -> ModuleSpec | None: ...
|
|
32
63
|
def invalidate_caches(self) -> None: ...
|