basedpyright 1.24.0 → 1.25.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.LICENSE.txt +42 -0
- 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/_asyncio.pyi +3 -25
- package/dist/typeshed-fallback/stdlib/_bisect.pyi +4 -44
- package/dist/typeshed-fallback/stdlib/_bootlocale.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +2 -16
- package/dist/typeshed-fallback/stdlib/_dbm.pyi +1 -13
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_dummy_thread.pyi +33 -33
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +164 -180
- package/dist/typeshed-fallback/stdlib/_gdbm.pyi +1 -39
- package/dist/typeshed-fallback/stdlib/_hashlib.pyi +7 -28
- package/dist/typeshed-fallback/stdlib/_imp.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/_msi.pyi +92 -94
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +6 -48
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_thread.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/_warnings.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/aifc.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/array.pyi +3 -17
- package/dist/typeshed-fallback/stdlib/asynchat.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/asyncio/sslproto.pyi +4 -23
- package/dist/typeshed-fallback/stdlib/asyncore.pyi +90 -90
- package/dist/typeshed-fallback/stdlib/audioop.pyi +43 -95
- package/dist/typeshed-fallback/stdlib/binascii.pyi +5 -15
- package/dist/typeshed-fallback/stdlib/binhex.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/builtins.pyi +8 -106
- package/dist/typeshed-fallback/stdlib/cgi.pyi +118 -118
- package/dist/typeshed-fallback/stdlib/cgitb.pyi +32 -32
- package/dist/typeshed-fallback/stdlib/chunk.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/datetime.pyi +4 -12
- package/dist/typeshed-fallback/stdlib/distutils/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/_msvccompiler.pyi +13 -13
- 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 +176 -176
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +229 -229
- package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -48
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +22 -22
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +46 -46
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_wininst.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +34 -34
- package/dist/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +52 -52
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +40 -40
- package/dist/typeshed-fallback/stdlib/distutils/command/clean.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +84 -84
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +71 -71
- package/dist/typeshed-fallback/stdlib/distutils/command/install_data.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +45 -45
- package/dist/typeshed-fallback/stdlib/distutils/command/upload.pyi +18 -18
- package/dist/typeshed-fallback/stdlib/distutils/config.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +58 -58
- package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -3
- 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 +317 -317
- 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 +26 -26
- package/dist/typeshed-fallback/stdlib/distutils/msvccompiler.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +10 -10
- 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 +53 -53
- package/dist/typeshed-fallback/stdlib/distutils/version.pyi +36 -38
- package/dist/typeshed-fallback/stdlib/dummy_threading.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/encodings/mac_centeuro.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/formatter.pyi +88 -88
- package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -30
- package/dist/typeshed-fallback/stdlib/imghdr.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/imp.pyi +62 -62
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +7 -36
- package/dist/typeshed-fallback/stdlib/lib2to3/btm_matcher.pyi +28 -28
- package/dist/typeshed-fallback/stdlib/lib2to3/fixer_base.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.pyi +19 -19
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -20
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/main.pyi +42 -42
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/driver.pyi +27 -27
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/literals.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/parse.pyi +30 -30
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +50 -50
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/token.pyi +69 -69
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.pyi +96 -96
- package/dist/typeshed-fallback/stdlib/lib2to3/pygram.pyi +114 -114
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +117 -127
- package/dist/typeshed-fallback/stdlib/lib2to3/refactor.pyi +82 -82
- package/dist/typeshed-fallback/stdlib/mailcap.pyi +11 -11
- package/dist/typeshed-fallback/stdlib/marshal.pyi +4 -52
- package/dist/typeshed-fallback/stdlib/math.pyi +2 -6
- 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/nis.pyi +4 -31
- package/dist/typeshed-fallback/stdlib/nntplib.pyi +125 -125
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/parser.pyi +24 -55
- package/dist/typeshed-fallback/stdlib/pipes.pyi +16 -16
- package/dist/typeshed-fallback/stdlib/smtpd.pyi +91 -91
- package/dist/typeshed-fallback/stdlib/sndhdr.pyi +14 -14
- package/dist/typeshed-fallback/stdlib/spwd.pyi +13 -66
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/ssl.pyi +0 -4
- package/dist/typeshed-fallback/stdlib/sunau.pyi +86 -86
- package/dist/typeshed-fallback/stdlib/symbol.pyi +93 -93
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +4 -40
- package/dist/typeshed-fallback/stdlib/telnetlib.pyi +123 -123
- package/dist/typeshed-fallback/stdlib/tkinter/tix.pyi +299 -299
- package/dist/typeshed-fallback/stdlib/types.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/typing.pyi +2 -6
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +544 -559
- package/dist/typeshed-fallback/stdlib/unittest/__init__.pyi +1 -6
- package/dist/typeshed-fallback/stdlib/uu.pyi +13 -13
- package/dist/typeshed-fallback/stdlib/xdrlib.pyi +57 -57
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +1 -3
- package/dist/typeshed-fallback/stdlib/zipimport.pyi +0 -29
- package/dist/typeshed-fallback/stdlib/zlib.pyi +1 -10
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +3 -9
- package/package.json +1 -1
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
from _typeshed import StrPath, Unused
|
|
2
|
-
from collections.abc import Callable, Container, Iterable, Mapping
|
|
3
|
-
from typing import Any, Literal
|
|
4
|
-
from typing_extensions import TypeVarTuple, Unpack
|
|
5
|
-
|
|
6
|
-
_Ts = TypeVarTuple("_Ts")
|
|
7
|
-
|
|
8
|
-
def get_host_platform() -> str: ...
|
|
9
|
-
def get_platform() -> str: ...
|
|
10
|
-
def convert_path(pathname: str) -> str: ...
|
|
11
|
-
def change_root(new_root: StrPath, pathname: StrPath) -> str: ...
|
|
12
|
-
def check_environ() -> None: ...
|
|
13
|
-
def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ...
|
|
14
|
-
def split_quoted(s: str) -> list[str]: ...
|
|
15
|
-
def execute(
|
|
16
|
-
func: Callable[[Unpack[_Ts]], Unused],
|
|
17
|
-
args: tuple[Unpack[_Ts]],
|
|
18
|
-
msg: str | None = None,
|
|
19
|
-
verbose: bool | Literal[0, 1] = 0,
|
|
20
|
-
dry_run: bool | Literal[0, 1] = 0,
|
|
21
|
-
) -> None: ...
|
|
22
|
-
def strtobool(val: str) -> Literal[0, 1]: ...
|
|
23
|
-
def byte_compile(
|
|
24
|
-
py_files: list[str],
|
|
25
|
-
optimize: int = 0,
|
|
26
|
-
force: bool | Literal[0, 1] = 0,
|
|
27
|
-
prefix: str | None = None,
|
|
28
|
-
base_dir: str | None = None,
|
|
29
|
-
verbose: bool | Literal[0, 1] = 1,
|
|
30
|
-
dry_run: bool | Literal[0, 1] = 0,
|
|
31
|
-
direct: bool | None = None,
|
|
32
|
-
) -> None: ...
|
|
33
|
-
def rfc822_escape(header: str) -> str: ...
|
|
34
|
-
def run_2to3(
|
|
35
|
-
files: Iterable[str],
|
|
36
|
-
fixer_names: Iterable[str] | None = None,
|
|
37
|
-
options: Mapping[str, Any] | None = None,
|
|
38
|
-
explicit: Unused = None,
|
|
39
|
-
) -> None: ...
|
|
40
|
-
def copydir_run_2to3(
|
|
41
|
-
src: StrPath,
|
|
42
|
-
dest: StrPath,
|
|
43
|
-
template: str | None = None,
|
|
44
|
-
fixer_names: Iterable[str] | None = None,
|
|
45
|
-
options: Mapping[str, Any] | None = None,
|
|
46
|
-
explicit: Container[str] | None = None,
|
|
47
|
-
) -> list[str]: ...
|
|
48
|
-
|
|
49
|
-
class Mixin2to3:
|
|
50
|
-
fixer_names: Iterable[str] | None
|
|
51
|
-
options: Mapping[str, Any] | None
|
|
52
|
-
explicit: Container[str] | None
|
|
53
|
-
def run_2to3(self, files: Iterable[str]) -> None: ...
|
|
1
|
+
from _typeshed import StrPath, Unused
|
|
2
|
+
from collections.abc import Callable, Container, Iterable, Mapping
|
|
3
|
+
from typing import Any, Literal
|
|
4
|
+
from typing_extensions import TypeVarTuple, Unpack
|
|
5
|
+
|
|
6
|
+
_Ts = TypeVarTuple("_Ts")
|
|
7
|
+
|
|
8
|
+
def get_host_platform() -> str: ...
|
|
9
|
+
def get_platform() -> str: ...
|
|
10
|
+
def convert_path(pathname: str) -> str: ...
|
|
11
|
+
def change_root(new_root: StrPath, pathname: StrPath) -> str: ...
|
|
12
|
+
def check_environ() -> None: ...
|
|
13
|
+
def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ...
|
|
14
|
+
def split_quoted(s: str) -> list[str]: ...
|
|
15
|
+
def execute(
|
|
16
|
+
func: Callable[[Unpack[_Ts]], Unused],
|
|
17
|
+
args: tuple[Unpack[_Ts]],
|
|
18
|
+
msg: str | None = None,
|
|
19
|
+
verbose: bool | Literal[0, 1] = 0,
|
|
20
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
21
|
+
) -> None: ...
|
|
22
|
+
def strtobool(val: str) -> Literal[0, 1]: ...
|
|
23
|
+
def byte_compile(
|
|
24
|
+
py_files: list[str],
|
|
25
|
+
optimize: int = 0,
|
|
26
|
+
force: bool | Literal[0, 1] = 0,
|
|
27
|
+
prefix: str | None = None,
|
|
28
|
+
base_dir: str | None = None,
|
|
29
|
+
verbose: bool | Literal[0, 1] = 1,
|
|
30
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
31
|
+
direct: bool | None = None,
|
|
32
|
+
) -> None: ...
|
|
33
|
+
def rfc822_escape(header: str) -> str: ...
|
|
34
|
+
def run_2to3(
|
|
35
|
+
files: Iterable[str],
|
|
36
|
+
fixer_names: Iterable[str] | None = None,
|
|
37
|
+
options: Mapping[str, Any] | None = None,
|
|
38
|
+
explicit: Unused = None,
|
|
39
|
+
) -> None: ...
|
|
40
|
+
def copydir_run_2to3(
|
|
41
|
+
src: StrPath,
|
|
42
|
+
dest: StrPath,
|
|
43
|
+
template: str | None = None,
|
|
44
|
+
fixer_names: Iterable[str] | None = None,
|
|
45
|
+
options: Mapping[str, Any] | None = None,
|
|
46
|
+
explicit: Container[str] | None = None,
|
|
47
|
+
) -> list[str]: ...
|
|
48
|
+
|
|
49
|
+
class Mixin2to3:
|
|
50
|
+
fixer_names: Iterable[str] | None
|
|
51
|
+
options: Mapping[str, Any] | None
|
|
52
|
+
explicit: Container[str] | None
|
|
53
|
+
def run_2to3(self, files: Iterable[str]) -> None: ...
|
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
from abc import abstractmethod
|
|
2
|
-
from re import Pattern
|
|
3
|
-
from typing_extensions import Self
|
|
4
|
-
|
|
5
|
-
class Version:
|
|
6
|
-
def __eq__(self, other: object) -> bool: ...
|
|
7
|
-
def __lt__(self, other: Self | str) -> bool: ...
|
|
8
|
-
def __le__(self, other: Self | str) -> bool: ...
|
|
9
|
-
def __gt__(self, other: Self | str) -> bool: ...
|
|
10
|
-
def __ge__(self, other: Self | str) -> bool: ...
|
|
11
|
-
@abstractmethod
|
|
12
|
-
def __init__(self, vstring: str | None = None) -> None: ...
|
|
13
|
-
@abstractmethod
|
|
14
|
-
def parse(self, vstring: str) -> Self: ...
|
|
15
|
-
@abstractmethod
|
|
16
|
-
def __str__(self) -> str:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def
|
|
27
|
-
def
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
vstring: str
|
|
34
|
-
|
|
35
|
-
def
|
|
36
|
-
def
|
|
37
|
-
def __str__(self) -> str: ... # noqa: Y029
|
|
38
|
-
def _cmp(self, other: Self | str) -> bool: ...
|
|
1
|
+
from abc import abstractmethod
|
|
2
|
+
from re import Pattern
|
|
3
|
+
from typing_extensions import Self
|
|
4
|
+
|
|
5
|
+
class Version:
|
|
6
|
+
def __eq__(self, other: object) -> bool: ...
|
|
7
|
+
def __lt__(self, other: Self | str) -> bool: ...
|
|
8
|
+
def __le__(self, other: Self | str) -> bool: ...
|
|
9
|
+
def __gt__(self, other: Self | str) -> bool: ...
|
|
10
|
+
def __ge__(self, other: Self | str) -> bool: ...
|
|
11
|
+
@abstractmethod
|
|
12
|
+
def __init__(self, vstring: str | None = None) -> None: ...
|
|
13
|
+
@abstractmethod
|
|
14
|
+
def parse(self, vstring: str) -> Self: ...
|
|
15
|
+
@abstractmethod
|
|
16
|
+
def __str__(self) -> str: ...
|
|
17
|
+
@abstractmethod
|
|
18
|
+
def _cmp(self, other: Self | str) -> bool: ...
|
|
19
|
+
|
|
20
|
+
class StrictVersion(Version):
|
|
21
|
+
version_re: Pattern[str]
|
|
22
|
+
version: tuple[int, int, int]
|
|
23
|
+
prerelease: tuple[str, int] | None
|
|
24
|
+
def __init__(self, vstring: str | None = None) -> None: ...
|
|
25
|
+
def parse(self, vstring: str) -> Self: ...
|
|
26
|
+
def __str__(self) -> str: ... # noqa: Y029
|
|
27
|
+
def _cmp(self, other: Self | str) -> bool: ...
|
|
28
|
+
|
|
29
|
+
class LooseVersion(Version):
|
|
30
|
+
component_re: Pattern[str]
|
|
31
|
+
vstring: str
|
|
32
|
+
version: tuple[str | int, ...]
|
|
33
|
+
def __init__(self, vstring: str | None = None) -> None: ...
|
|
34
|
+
def parse(self, vstring: str) -> Self: ...
|
|
35
|
+
def __str__(self) -> str: ... # noqa: Y029
|
|
36
|
+
def _cmp(self, other: Self | str) -> bool: ...
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
from _dummy_threading import *
|
|
2
|
-
from _dummy_threading import __all__ as __all__
|
|
1
|
+
from _dummy_threading import *
|
|
2
|
+
from _dummy_threading import __all__ as __all__
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import codecs
|
|
2
|
-
from _codecs import _EncodingMap
|
|
3
|
-
from _typeshed import ReadableBuffer
|
|
4
|
-
|
|
5
|
-
class Codec(codecs.Codec):
|
|
6
|
-
def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ...
|
|
7
|
-
def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ...
|
|
8
|
-
|
|
9
|
-
class IncrementalEncoder(codecs.IncrementalEncoder):
|
|
10
|
-
def encode(self, input: str, final: bool = False) -> bytes: ...
|
|
11
|
-
|
|
12
|
-
class IncrementalDecoder(codecs.IncrementalDecoder):
|
|
13
|
-
def decode(self, input: ReadableBuffer, final: bool = False) -> str: ...
|
|
14
|
-
|
|
15
|
-
class StreamWriter(Codec, codecs.StreamWriter): ...
|
|
16
|
-
class StreamReader(Codec, codecs.StreamReader): ...
|
|
17
|
-
|
|
18
|
-
def getregentry() -> codecs.CodecInfo: ...
|
|
19
|
-
|
|
20
|
-
decoding_table: str
|
|
21
|
-
encoding_table: _EncodingMap
|
|
1
|
+
import codecs
|
|
2
|
+
from _codecs import _EncodingMap
|
|
3
|
+
from _typeshed import ReadableBuffer
|
|
4
|
+
|
|
5
|
+
class Codec(codecs.Codec):
|
|
6
|
+
def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ...
|
|
7
|
+
def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ...
|
|
8
|
+
|
|
9
|
+
class IncrementalEncoder(codecs.IncrementalEncoder):
|
|
10
|
+
def encode(self, input: str, final: bool = False) -> bytes: ...
|
|
11
|
+
|
|
12
|
+
class IncrementalDecoder(codecs.IncrementalDecoder):
|
|
13
|
+
def decode(self, input: ReadableBuffer, final: bool = False) -> str: ...
|
|
14
|
+
|
|
15
|
+
class StreamWriter(Codec, codecs.StreamWriter): ...
|
|
16
|
+
class StreamReader(Codec, codecs.StreamReader): ...
|
|
17
|
+
|
|
18
|
+
def getregentry() -> codecs.CodecInfo: ...
|
|
19
|
+
|
|
20
|
+
decoding_table: str
|
|
21
|
+
encoding_table: _EncodingMap
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
from collections.abc import Iterable
|
|
2
|
-
from typing import IO, Any
|
|
3
|
-
from typing_extensions import TypeAlias
|
|
4
|
-
|
|
5
|
-
AS_IS: None
|
|
6
|
-
_FontType: TypeAlias = tuple[str, bool, bool, bool]
|
|
7
|
-
_StylesType: TypeAlias = tuple[Any, ...]
|
|
8
|
-
|
|
9
|
-
class NullFormatter:
|
|
10
|
-
writer: NullWriter | None
|
|
11
|
-
def __init__(self, writer: NullWriter | None = None) -> None: ...
|
|
12
|
-
def end_paragraph(self, blankline: int) -> None: ...
|
|
13
|
-
def add_line_break(self) -> None: ...
|
|
14
|
-
def add_hor_rule(self, *args: Any, **kw: Any) -> None: ...
|
|
15
|
-
def add_label_data(self, format: str, counter: int, blankline: int | None = None) -> None: ...
|
|
16
|
-
def add_flowing_data(self, data: str) -> None: ...
|
|
17
|
-
def add_literal_data(self, data: str) -> None: ...
|
|
18
|
-
def flush_softspace(self) -> None: ...
|
|
19
|
-
def push_alignment(self, align: str | None) -> None: ...
|
|
20
|
-
def pop_alignment(self) -> None: ...
|
|
21
|
-
def push_font(self, x: _FontType) -> None: ...
|
|
22
|
-
def pop_font(self) -> None: ...
|
|
23
|
-
def push_margin(self, margin: int) -> None: ...
|
|
24
|
-
def pop_margin(self) -> None: ...
|
|
25
|
-
def set_spacing(self, spacing: str | None) -> None: ...
|
|
26
|
-
def push_style(self, *styles: _StylesType) -> None: ...
|
|
27
|
-
def pop_style(self, n: int = 1) -> None: ...
|
|
28
|
-
def assert_line_data(self, flag: int = 1) -> None: ...
|
|
29
|
-
|
|
30
|
-
class AbstractFormatter:
|
|
31
|
-
writer: NullWriter
|
|
32
|
-
align: str | None
|
|
33
|
-
align_stack: list[str | None]
|
|
34
|
-
font_stack: list[_FontType]
|
|
35
|
-
margin_stack: list[int]
|
|
36
|
-
spacing: str | None
|
|
37
|
-
style_stack: Any
|
|
38
|
-
nospace: int
|
|
39
|
-
softspace: int
|
|
40
|
-
para_end: int
|
|
41
|
-
parskip: int
|
|
42
|
-
hard_break: int
|
|
43
|
-
have_label: int
|
|
44
|
-
def __init__(self, writer: NullWriter) -> None: ...
|
|
45
|
-
def end_paragraph(self, blankline: int) -> None: ...
|
|
46
|
-
def add_line_break(self) -> None: ...
|
|
47
|
-
def add_hor_rule(self, *args: Any, **kw: Any) -> None: ...
|
|
48
|
-
def add_label_data(self, format: str, counter: int, blankline: int | None = None) -> None: ...
|
|
49
|
-
def format_counter(self, format: Iterable[str], counter: int) -> str: ...
|
|
50
|
-
def format_letter(self, case: str, counter: int) -> str: ...
|
|
51
|
-
def format_roman(self, case: str, counter: int) -> str: ...
|
|
52
|
-
def add_flowing_data(self, data: str) -> None: ...
|
|
53
|
-
def add_literal_data(self, data: str) -> None: ...
|
|
54
|
-
def flush_softspace(self) -> None: ...
|
|
55
|
-
def push_alignment(self, align: str | None) -> None: ...
|
|
56
|
-
def pop_alignment(self) -> None: ...
|
|
57
|
-
def push_font(self, font: _FontType) -> None: ...
|
|
58
|
-
def pop_font(self) -> None: ...
|
|
59
|
-
def push_margin(self, margin: int) -> None: ...
|
|
60
|
-
def pop_margin(self) -> None: ...
|
|
61
|
-
def set_spacing(self, spacing: str | None) -> None: ...
|
|
62
|
-
def push_style(self, *styles: _StylesType) -> None: ...
|
|
63
|
-
def pop_style(self, n: int = 1) -> None: ...
|
|
64
|
-
def assert_line_data(self, flag: int = 1) -> None: ...
|
|
65
|
-
|
|
66
|
-
class NullWriter:
|
|
67
|
-
def flush(self) -> None: ...
|
|
68
|
-
def new_alignment(self, align: str | None) -> None: ...
|
|
69
|
-
def new_font(self, font: _FontType) -> None: ...
|
|
70
|
-
def new_margin(self, margin: int, level: int) -> None: ...
|
|
71
|
-
def new_spacing(self, spacing: str | None) -> None: ...
|
|
72
|
-
def new_styles(self, styles: tuple[Any, ...]) -> None: ...
|
|
73
|
-
def send_paragraph(self, blankline: int) -> None: ...
|
|
74
|
-
def send_line_break(self) -> None: ...
|
|
75
|
-
def send_hor_rule(self, *args: Any, **kw: Any) -> None: ...
|
|
76
|
-
def send_label_data(self, data: str) -> None: ...
|
|
77
|
-
def send_flowing_data(self, data: str) -> None: ...
|
|
78
|
-
def send_literal_data(self, data: str) -> None: ...
|
|
79
|
-
|
|
80
|
-
class AbstractWriter(NullWriter): ...
|
|
81
|
-
|
|
82
|
-
class DumbWriter(NullWriter):
|
|
83
|
-
file: IO[str]
|
|
84
|
-
maxcol: int
|
|
85
|
-
def __init__(self, file: IO[str] | None = None, maxcol: int = 72) -> None: ...
|
|
86
|
-
def reset(self) -> None: ...
|
|
87
|
-
|
|
88
|
-
def test(file: str | None = None) -> None: ...
|
|
1
|
+
from collections.abc import Iterable
|
|
2
|
+
from typing import IO, Any
|
|
3
|
+
from typing_extensions import TypeAlias
|
|
4
|
+
|
|
5
|
+
AS_IS: None
|
|
6
|
+
_FontType: TypeAlias = tuple[str, bool, bool, bool]
|
|
7
|
+
_StylesType: TypeAlias = tuple[Any, ...]
|
|
8
|
+
|
|
9
|
+
class NullFormatter:
|
|
10
|
+
writer: NullWriter | None
|
|
11
|
+
def __init__(self, writer: NullWriter | None = None) -> None: ...
|
|
12
|
+
def end_paragraph(self, blankline: int) -> None: ...
|
|
13
|
+
def add_line_break(self) -> None: ...
|
|
14
|
+
def add_hor_rule(self, *args: Any, **kw: Any) -> None: ...
|
|
15
|
+
def add_label_data(self, format: str, counter: int, blankline: int | None = None) -> None: ...
|
|
16
|
+
def add_flowing_data(self, data: str) -> None: ...
|
|
17
|
+
def add_literal_data(self, data: str) -> None: ...
|
|
18
|
+
def flush_softspace(self) -> None: ...
|
|
19
|
+
def push_alignment(self, align: str | None) -> None: ...
|
|
20
|
+
def pop_alignment(self) -> None: ...
|
|
21
|
+
def push_font(self, x: _FontType) -> None: ...
|
|
22
|
+
def pop_font(self) -> None: ...
|
|
23
|
+
def push_margin(self, margin: int) -> None: ...
|
|
24
|
+
def pop_margin(self) -> None: ...
|
|
25
|
+
def set_spacing(self, spacing: str | None) -> None: ...
|
|
26
|
+
def push_style(self, *styles: _StylesType) -> None: ...
|
|
27
|
+
def pop_style(self, n: int = 1) -> None: ...
|
|
28
|
+
def assert_line_data(self, flag: int = 1) -> None: ...
|
|
29
|
+
|
|
30
|
+
class AbstractFormatter:
|
|
31
|
+
writer: NullWriter
|
|
32
|
+
align: str | None
|
|
33
|
+
align_stack: list[str | None]
|
|
34
|
+
font_stack: list[_FontType]
|
|
35
|
+
margin_stack: list[int]
|
|
36
|
+
spacing: str | None
|
|
37
|
+
style_stack: Any
|
|
38
|
+
nospace: int
|
|
39
|
+
softspace: int
|
|
40
|
+
para_end: int
|
|
41
|
+
parskip: int
|
|
42
|
+
hard_break: int
|
|
43
|
+
have_label: int
|
|
44
|
+
def __init__(self, writer: NullWriter) -> None: ...
|
|
45
|
+
def end_paragraph(self, blankline: int) -> None: ...
|
|
46
|
+
def add_line_break(self) -> None: ...
|
|
47
|
+
def add_hor_rule(self, *args: Any, **kw: Any) -> None: ...
|
|
48
|
+
def add_label_data(self, format: str, counter: int, blankline: int | None = None) -> None: ...
|
|
49
|
+
def format_counter(self, format: Iterable[str], counter: int) -> str: ...
|
|
50
|
+
def format_letter(self, case: str, counter: int) -> str: ...
|
|
51
|
+
def format_roman(self, case: str, counter: int) -> str: ...
|
|
52
|
+
def add_flowing_data(self, data: str) -> None: ...
|
|
53
|
+
def add_literal_data(self, data: str) -> None: ...
|
|
54
|
+
def flush_softspace(self) -> None: ...
|
|
55
|
+
def push_alignment(self, align: str | None) -> None: ...
|
|
56
|
+
def pop_alignment(self) -> None: ...
|
|
57
|
+
def push_font(self, font: _FontType) -> None: ...
|
|
58
|
+
def pop_font(self) -> None: ...
|
|
59
|
+
def push_margin(self, margin: int) -> None: ...
|
|
60
|
+
def pop_margin(self) -> None: ...
|
|
61
|
+
def set_spacing(self, spacing: str | None) -> None: ...
|
|
62
|
+
def push_style(self, *styles: _StylesType) -> None: ...
|
|
63
|
+
def pop_style(self, n: int = 1) -> None: ...
|
|
64
|
+
def assert_line_data(self, flag: int = 1) -> None: ...
|
|
65
|
+
|
|
66
|
+
class NullWriter:
|
|
67
|
+
def flush(self) -> None: ...
|
|
68
|
+
def new_alignment(self, align: str | None) -> None: ...
|
|
69
|
+
def new_font(self, font: _FontType) -> None: ...
|
|
70
|
+
def new_margin(self, margin: int, level: int) -> None: ...
|
|
71
|
+
def new_spacing(self, spacing: str | None) -> None: ...
|
|
72
|
+
def new_styles(self, styles: tuple[Any, ...]) -> None: ...
|
|
73
|
+
def send_paragraph(self, blankline: int) -> None: ...
|
|
74
|
+
def send_line_break(self) -> None: ...
|
|
75
|
+
def send_hor_rule(self, *args: Any, **kw: Any) -> None: ...
|
|
76
|
+
def send_label_data(self, data: str) -> None: ...
|
|
77
|
+
def send_flowing_data(self, data: str) -> None: ...
|
|
78
|
+
def send_literal_data(self, data: str) -> None: ...
|
|
79
|
+
|
|
80
|
+
class AbstractWriter(NullWriter): ...
|
|
81
|
+
|
|
82
|
+
class DumbWriter(NullWriter):
|
|
83
|
+
file: IO[str]
|
|
84
|
+
maxcol: int
|
|
85
|
+
def __init__(self, file: IO[str] | None = None, maxcol: int = 72) -> None: ...
|
|
86
|
+
def reset(self) -> None: ...
|
|
87
|
+
|
|
88
|
+
def test(file: str | None = None) -> None: ...
|
|
@@ -37,34 +37,6 @@ if sys.version_info >= (3, 9):
|
|
|
37
37
|
from _hashlib import compare_digest as compare_digest
|
|
38
38
|
else:
|
|
39
39
|
@overload
|
|
40
|
-
def compare_digest(a: ReadableBuffer, b: ReadableBuffer, /) -> bool:
|
|
41
|
-
"""
|
|
42
|
-
Return 'a == b'.
|
|
43
|
-
|
|
44
|
-
This function uses an approach designed to prevent
|
|
45
|
-
timing analysis, making it appropriate for cryptography.
|
|
46
|
-
|
|
47
|
-
a and b must both be of the same type: either str (ASCII only),
|
|
48
|
-
or any bytes-like object.
|
|
49
|
-
|
|
50
|
-
Note: If a and b are of different lengths, or if an error occurs,
|
|
51
|
-
a timing attack could theoretically reveal information about the
|
|
52
|
-
types and lengths of a and b--but not their values.
|
|
53
|
-
"""
|
|
54
|
-
...
|
|
40
|
+
def compare_digest(a: ReadableBuffer, b: ReadableBuffer, /) -> bool: ...
|
|
55
41
|
@overload
|
|
56
|
-
def compare_digest(a: AnyStr, b: AnyStr, /) -> bool:
|
|
57
|
-
"""
|
|
58
|
-
Return 'a == b'.
|
|
59
|
-
|
|
60
|
-
This function uses an approach designed to prevent
|
|
61
|
-
timing analysis, making it appropriate for cryptography.
|
|
62
|
-
|
|
63
|
-
a and b must both be of the same type: either str (ASCII only),
|
|
64
|
-
or any bytes-like object.
|
|
65
|
-
|
|
66
|
-
Note: If a and b are of different lengths, or if an error occurs,
|
|
67
|
-
a timing attack could theoretically reveal information about the
|
|
68
|
-
types and lengths of a and b--but not their values.
|
|
69
|
-
"""
|
|
70
|
-
...
|
|
42
|
+
def compare_digest(a: AnyStr, b: AnyStr, /) -> bool: ...
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
from _typeshed import StrPath
|
|
2
|
-
from collections.abc import Callable
|
|
3
|
-
from typing import Any, BinaryIO, Protocol, overload
|
|
4
|
-
|
|
5
|
-
__all__ = ["what"]
|
|
6
|
-
|
|
7
|
-
class _ReadableBinary(Protocol):
|
|
8
|
-
def tell(self) -> int: ...
|
|
9
|
-
def read(self, size: int, /) -> bytes: ...
|
|
10
|
-
def seek(self, offset: int, /) -> Any: ...
|
|
11
|
-
|
|
12
|
-
@overload
|
|
13
|
-
def what(file: StrPath | _ReadableBinary, h: None = None) -> str | None: ...
|
|
14
|
-
@overload
|
|
15
|
-
def what(file: Any, h: bytes) -> str | None: ...
|
|
16
|
-
|
|
17
|
-
tests: list[Callable[[bytes, BinaryIO | None], str | None]]
|
|
1
|
+
from _typeshed import StrPath
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from typing import Any, BinaryIO, Protocol, overload
|
|
4
|
+
|
|
5
|
+
__all__ = ["what"]
|
|
6
|
+
|
|
7
|
+
class _ReadableBinary(Protocol):
|
|
8
|
+
def tell(self) -> int: ...
|
|
9
|
+
def read(self, size: int, /) -> bytes: ...
|
|
10
|
+
def seek(self, offset: int, /) -> Any: ...
|
|
11
|
+
|
|
12
|
+
@overload
|
|
13
|
+
def what(file: StrPath | _ReadableBinary, h: None = None) -> str | None: ...
|
|
14
|
+
@overload
|
|
15
|
+
def what(file: Any, h: bytes) -> str | None: ...
|
|
16
|
+
|
|
17
|
+
tests: list[Callable[[bytes, BinaryIO | None], str | None]]
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import types
|
|
2
|
-
from _imp import (
|
|
3
|
-
acquire_lock as acquire_lock,
|
|
4
|
-
create_dynamic as create_dynamic,
|
|
5
|
-
get_frozen_object as get_frozen_object,
|
|
6
|
-
init_frozen as init_frozen,
|
|
7
|
-
is_builtin as is_builtin,
|
|
8
|
-
is_frozen as is_frozen,
|
|
9
|
-
is_frozen_package as is_frozen_package,
|
|
10
|
-
lock_held as lock_held,
|
|
11
|
-
release_lock as release_lock,
|
|
12
|
-
)
|
|
13
|
-
from _typeshed import StrPath
|
|
14
|
-
from os import PathLike
|
|
15
|
-
from types import TracebackType
|
|
16
|
-
from typing import IO, Any, Protocol
|
|
17
|
-
|
|
18
|
-
SEARCH_ERROR: int
|
|
19
|
-
PY_SOURCE: int
|
|
20
|
-
PY_COMPILED: int
|
|
21
|
-
C_EXTENSION: int
|
|
22
|
-
PY_RESOURCE: int
|
|
23
|
-
PKG_DIRECTORY: int
|
|
24
|
-
C_BUILTIN: int
|
|
25
|
-
PY_FROZEN: int
|
|
26
|
-
PY_CODERESOURCE: int
|
|
27
|
-
IMP_HOOK: int
|
|
28
|
-
|
|
29
|
-
def new_module(name: str) -> types.ModuleType: ...
|
|
30
|
-
def get_magic() -> bytes: ...
|
|
31
|
-
def get_tag() -> str: ...
|
|
32
|
-
def cache_from_source(path: StrPath, debug_override: bool | None = None) -> str: ...
|
|
33
|
-
def source_from_cache(path: StrPath) -> str: ...
|
|
34
|
-
def get_suffixes() -> list[tuple[str, str, int]]: ...
|
|
35
|
-
|
|
36
|
-
class NullImporter:
|
|
37
|
-
def __init__(self, path: StrPath) -> None: ...
|
|
38
|
-
def find_module(self, fullname: Any) -> None: ...
|
|
39
|
-
|
|
40
|
-
# Technically, a text file has to support a slightly different set of operations than a binary file,
|
|
41
|
-
# but we ignore that here.
|
|
42
|
-
class _FileLike(Protocol):
|
|
43
|
-
closed: bool
|
|
44
|
-
mode: str
|
|
45
|
-
def read(self) -> str | bytes: ...
|
|
46
|
-
def close(self) -> Any: ...
|
|
47
|
-
def __enter__(self) -> Any: ...
|
|
48
|
-
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None, /) -> Any: ...
|
|
49
|
-
|
|
50
|
-
# PathLike doesn't work for the pathname argument here
|
|
51
|
-
def load_source(name: str, pathname: str, file: _FileLike | None = None) -> types.ModuleType: ...
|
|
52
|
-
def load_compiled(name: str, pathname: str, file: _FileLike | None = None) -> types.ModuleType: ...
|
|
53
|
-
def load_package(name: str, path: StrPath) -> types.ModuleType: ...
|
|
54
|
-
def load_module(name: str, file: _FileLike | None, filename: str, details: tuple[str, str, int]) -> types.ModuleType: ...
|
|
55
|
-
|
|
56
|
-
# IO[Any] is a TextIOWrapper if name is a .py file, and a FileIO otherwise.
|
|
57
|
-
def find_module(
|
|
58
|
-
name: str, path: None | list[str] | list[PathLike[str]] | list[StrPath] = None
|
|
59
|
-
) -> tuple[IO[Any], str, tuple[str, str, int]]: ...
|
|
60
|
-
def reload(module: types.ModuleType) -> types.ModuleType: ...
|
|
61
|
-
def init_builtin(name: str) -> types.ModuleType | None: ...
|
|
62
|
-
def load_dynamic(name: str, path: str, file: Any = None) -> types.ModuleType: ... # file argument is ignored
|
|
1
|
+
import types
|
|
2
|
+
from _imp import (
|
|
3
|
+
acquire_lock as acquire_lock,
|
|
4
|
+
create_dynamic as create_dynamic,
|
|
5
|
+
get_frozen_object as get_frozen_object,
|
|
6
|
+
init_frozen as init_frozen,
|
|
7
|
+
is_builtin as is_builtin,
|
|
8
|
+
is_frozen as is_frozen,
|
|
9
|
+
is_frozen_package as is_frozen_package,
|
|
10
|
+
lock_held as lock_held,
|
|
11
|
+
release_lock as release_lock,
|
|
12
|
+
)
|
|
13
|
+
from _typeshed import StrPath
|
|
14
|
+
from os import PathLike
|
|
15
|
+
from types import TracebackType
|
|
16
|
+
from typing import IO, Any, Protocol
|
|
17
|
+
|
|
18
|
+
SEARCH_ERROR: int
|
|
19
|
+
PY_SOURCE: int
|
|
20
|
+
PY_COMPILED: int
|
|
21
|
+
C_EXTENSION: int
|
|
22
|
+
PY_RESOURCE: int
|
|
23
|
+
PKG_DIRECTORY: int
|
|
24
|
+
C_BUILTIN: int
|
|
25
|
+
PY_FROZEN: int
|
|
26
|
+
PY_CODERESOURCE: int
|
|
27
|
+
IMP_HOOK: int
|
|
28
|
+
|
|
29
|
+
def new_module(name: str) -> types.ModuleType: ...
|
|
30
|
+
def get_magic() -> bytes: ...
|
|
31
|
+
def get_tag() -> str: ...
|
|
32
|
+
def cache_from_source(path: StrPath, debug_override: bool | None = None) -> str: ...
|
|
33
|
+
def source_from_cache(path: StrPath) -> str: ...
|
|
34
|
+
def get_suffixes() -> list[tuple[str, str, int]]: ...
|
|
35
|
+
|
|
36
|
+
class NullImporter:
|
|
37
|
+
def __init__(self, path: StrPath) -> None: ...
|
|
38
|
+
def find_module(self, fullname: Any) -> None: ...
|
|
39
|
+
|
|
40
|
+
# Technically, a text file has to support a slightly different set of operations than a binary file,
|
|
41
|
+
# but we ignore that here.
|
|
42
|
+
class _FileLike(Protocol):
|
|
43
|
+
closed: bool
|
|
44
|
+
mode: str
|
|
45
|
+
def read(self) -> str | bytes: ...
|
|
46
|
+
def close(self) -> Any: ...
|
|
47
|
+
def __enter__(self) -> Any: ...
|
|
48
|
+
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None, /) -> Any: ...
|
|
49
|
+
|
|
50
|
+
# PathLike doesn't work for the pathname argument here
|
|
51
|
+
def load_source(name: str, pathname: str, file: _FileLike | None = None) -> types.ModuleType: ...
|
|
52
|
+
def load_compiled(name: str, pathname: str, file: _FileLike | None = None) -> types.ModuleType: ...
|
|
53
|
+
def load_package(name: str, path: StrPath) -> types.ModuleType: ...
|
|
54
|
+
def load_module(name: str, file: _FileLike | None, filename: str, details: tuple[str, str, int]) -> types.ModuleType: ...
|
|
55
|
+
|
|
56
|
+
# IO[Any] is a TextIOWrapper if name is a .py file, and a FileIO otherwise.
|
|
57
|
+
def find_module(
|
|
58
|
+
name: str, path: None | list[str] | list[PathLike[str]] | list[StrPath] = None
|
|
59
|
+
) -> tuple[IO[Any], str, tuple[str, str, int]]: ...
|
|
60
|
+
def reload(module: types.ModuleType) -> types.ModuleType: ...
|
|
61
|
+
def init_builtin(name: str) -> types.ModuleType | None: ...
|
|
62
|
+
def load_dynamic(name: str, path: str, file: Any = None) -> types.ModuleType: ... # file argument is ignored
|