basedpyright 1.12.2 → 1.12.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/README.md +2 -2
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +1 -1
- package/dist/typeshed-fallback/stdlib/_ast.pyi +661 -22
- package/dist/typeshed-fallback/stdlib/_ctypes.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/_stat.pyi +27 -13
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/_typeshed/importlib.pyi +18 -0
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/array.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/ast.pyi +160 -70
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/atexit.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/builtins.pyi +30 -8
- package/dist/typeshed-fallback/stdlib/calendar.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/code.pyi +27 -8
- package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/contextvars.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/csv.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +9 -2
- package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +5 -2
- package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +5 -2
- package/dist/typeshed-fallback/stdlib/difflib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/dis.pyi +16 -1
- package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +22 -7
- package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +37 -16
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +52 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -3
- package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +20 -10
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +8 -5
- package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +35 -11
- package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +11 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/distutils/util.pyi +9 -5
- package/dist/typeshed-fallback/stdlib/faulthandler.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/filecmp.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/fileinput.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/functools.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/genericpath.pyi +7 -0
- package/dist/typeshed-fallback/stdlib/graphlib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/http/__init__.pyi +11 -4
- package/dist/typeshed-fallback/stdlib/http/cookies.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/importlib/util.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/inspect.pyi +6 -0
- package/dist/typeshed-fallback/stdlib/keyword.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +69 -42
- package/dist/typeshed-fallback/stdlib/mailbox.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/marshal.pyi +12 -4
- package/dist/typeshed-fallback/stdlib/math.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/ntpath.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/opcode.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/optparse.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/queue.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/random.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/re.pyi +20 -9
- package/dist/typeshed-fallback/stdlib/shelve.pyi +15 -2
- package/dist/typeshed-fallback/stdlib/shutil.pyi +38 -8
- package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/socket.pyi +13 -0
- package/dist/typeshed-fallback/stdlib/stat.pyi +6 -0
- package/dist/typeshed-fallback/stdlib/statistics.pyi +30 -1
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +15 -19
- package/dist/typeshed-fallback/stdlib/syslog.pyi +9 -0
- package/dist/typeshed-fallback/stdlib/tempfile.pyi +7 -3
- package/dist/typeshed-fallback/stdlib/threading.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/token.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +10 -3
- package/dist/typeshed-fallback/stdlib/types.pyi +20 -18
- package/dist/typeshed-fallback/stdlib/typing.pyi +75 -21
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +104 -83
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/urllib/request.pyi +17 -10
- package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +31 -3
- package/dist/typeshed-fallback/stdlib/warnings.pyi +13 -1
- package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +2 -0
- package/dist/typeshed-fallback/stubs/Pillow/PIL/DdsImagePlugin.pyi +17 -17
- package/dist/typeshed-fallback/stubs/Pillow/PIL/Image.pyi +29 -29
- package/dist/typeshed-fallback/stubs/Pillow/PIL/WalImageFile.pyi +2 -1
- package/dist/typeshed-fallback/stubs/Pillow/PIL/_binary.pyi +13 -13
- package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +8 -3
- package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +10 -3
- package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/ATNType.pyi +2 -2
- package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/LexerAction.pyi +8 -8
- package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/PredictionMode.pyi +3 -3
- package/dist/typeshed-fallback/stubs/assertpy/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/__init__.pyi +12 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/assertpy.pyi +70 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/base.pyi +21 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/collection.pyi +11 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/contains.pyi +16 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/date.pyi +11 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/dict.pyi +12 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/dynamic.pyi +7 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/exception.pyi +8 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/file.pyi +15 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/helpers.pyi +3 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/numeric.pyi +24 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/snapshot.pyi +6 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/string.pyi +18 -0
- package/dist/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi +15 -7
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +119 -61
- package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +3 -3
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +31 -20
- package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +16 -8
- package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +3 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/__init__.pyi +8 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/_compat.pyi +5 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/api/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/api/legacy.pyi +27 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/checker.pyi +56 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/defaults.pyi +12 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/discover_files.pyi +8 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/exceptions.pyi +24 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/_windows_color.pyi +1 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/base.pyi +24 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/default.pyi +29 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/application.pyi +29 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/cli.pyi +3 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/debug.pyi +5 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/options.pyi +12 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/aggregator.pyi +12 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/config.pyi +10 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/manager.pyi +71 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/parse_args.pyi +6 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/finder.pyi +48 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pycodestyle.pyi +32 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pyflakes.pyi +21 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/reporter.pyi +9 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/processor.pyi +72 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/statistics.pyi +28 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/style_guide.pyi +70 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/utils.pyi +25 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/violation.pyi +13 -0
- package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/bidi.pyi +5 -3
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +5 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +15 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +2 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +45 -32
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +4 -4
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/svg.pyi +0 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +2 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +4 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/adapters.pyi +1 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/v1/__init__.pyi +35 -23
- package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/exceptions.pyi +3 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/rest.pyi +8 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -0
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +8 -6
- package/dist/typeshed-fallback/stubs/pyaudio/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/pyflakes.pyi +8 -0
- package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/_pygit2.pyi +1 -15
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/enums.pyi +313 -314
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/index.pyi +2 -1
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/remotes.pyi +7 -1
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/repository.pyi +4 -14
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +7 -1
- package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/regex/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/regex/regex/_regex_core.pyi +35 -35
- package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +10 -10
- package/dist/typeshed-fallback/stubs/requests/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +16 -9
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +4 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_modified.pyi +16 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +25 -10
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +38 -16
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +58 -30
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/upload.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dep_util.pyi +1 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +8 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +14 -6
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +4 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +8 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install.pyi +3 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +10 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_scripts.pyi +1 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/upload_docs.pyi +2 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/uWSGI/METADATA.toml +4 -1
- package/dist/typeshed-fallback/stubs/ujson/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/wurlitzer/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/wurlitzer/wurlitzer.pyi +48 -6
- package/package.json +1 -1
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
from _typeshed import StrOrBytesPath, StrPath
|
|
2
|
+
from collections.abc import Iterable
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
def mkpath(name: str, mode: int = 0o777, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0) -> list[str]: ...
|
|
6
|
+
def create_tree(
|
|
7
|
+
base_dir: StrPath,
|
|
8
|
+
files: Iterable[StrPath],
|
|
9
|
+
mode: int = 0o777,
|
|
10
|
+
verbose: bool | Literal[0, 1] = 1,
|
|
11
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
12
|
+
) -> None: ...
|
|
3
13
|
def copy_tree(
|
|
4
|
-
src:
|
|
14
|
+
src: StrPath,
|
|
5
15
|
dst: str,
|
|
6
|
-
preserve_mode:
|
|
7
|
-
preserve_times:
|
|
8
|
-
preserve_symlinks:
|
|
9
|
-
update:
|
|
10
|
-
verbose:
|
|
11
|
-
dry_run:
|
|
16
|
+
preserve_mode: bool | Literal[0, 1] = 1,
|
|
17
|
+
preserve_times: bool | Literal[0, 1] = 1,
|
|
18
|
+
preserve_symlinks: bool | Literal[0, 1] = 0,
|
|
19
|
+
update: bool | Literal[0, 1] = 0,
|
|
20
|
+
verbose: bool | Literal[0, 1] = 1,
|
|
21
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
12
22
|
) -> list[str]: ...
|
|
13
|
-
def remove_tree(directory:
|
|
23
|
+
def remove_tree(directory: StrOrBytesPath, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0) -> None: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from _typeshed import
|
|
1
|
+
from _typeshed import Incomplete, StrOrBytesPath, StrPath, SupportsWrite
|
|
2
2
|
from collections.abc import Iterable, Mapping
|
|
3
3
|
from distutils.cmd import Command
|
|
4
4
|
from re import Pattern
|
|
5
|
-
from typing import IO, Any, ClassVar, TypeVar, overload
|
|
5
|
+
from typing import IO, Any, ClassVar, Literal, TypeVar, overload
|
|
6
6
|
from typing_extensions import TypeAlias
|
|
7
7
|
|
|
8
8
|
command_re: Pattern[str]
|
|
@@ -11,7 +11,7 @@ _OptionsList: TypeAlias = list[tuple[str, str | None, str, int] | tuple[str, str
|
|
|
11
11
|
_CommandT = TypeVar("_CommandT", bound=Command)
|
|
12
12
|
|
|
13
13
|
class DistributionMetadata:
|
|
14
|
-
def __init__(self, path:
|
|
14
|
+
def __init__(self, path: StrOrBytesPath | None = None) -> None: ...
|
|
15
15
|
name: str | None
|
|
16
16
|
version: str | None
|
|
17
17
|
author: str | None
|
|
@@ -30,7 +30,7 @@ class DistributionMetadata:
|
|
|
30
30
|
requires: list[str] | None
|
|
31
31
|
obsoletes: list[str] | None
|
|
32
32
|
def read_pkg_file(self, file: IO[str]) -> None: ...
|
|
33
|
-
def write_pkg_info(self, base_dir:
|
|
33
|
+
def write_pkg_info(self, base_dir: StrPath) -> None: ...
|
|
34
34
|
def write_pkg_file(self, file: SupportsWrite[str]) -> None: ...
|
|
35
35
|
def get_name(self) -> str: ...
|
|
36
36
|
def get_version(self) -> str: ...
|
|
@@ -63,7 +63,10 @@ class Distribution:
|
|
|
63
63
|
def __init__(self, attrs: Mapping[str, Any] | None = None) -> None: ...
|
|
64
64
|
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
|
|
65
65
|
def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
|
|
66
|
-
|
|
66
|
+
@overload
|
|
67
|
+
def get_command_obj(self, command: str, create: Literal[1, True] = 1) -> Command: ...
|
|
68
|
+
@overload
|
|
69
|
+
def get_command_obj(self, command: str, create: Literal[0, False]) -> Command | None: ...
|
|
67
70
|
global_options: ClassVar[_OptionsList]
|
|
68
71
|
common_usage: ClassVar[str]
|
|
69
72
|
display_options: ClassVar[_OptionsList]
|
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
from
|
|
1
|
+
from _typeshed import BytesPath, StrOrBytesPath, StrPath
|
|
2
|
+
from collections.abc import Iterable
|
|
3
|
+
from typing import Literal, TypeVar, overload
|
|
2
4
|
|
|
5
|
+
_StrPathT = TypeVar("_StrPathT", bound=StrPath)
|
|
6
|
+
_BytesPathT = TypeVar("_BytesPathT", bound=BytesPath)
|
|
7
|
+
|
|
8
|
+
@overload
|
|
9
|
+
def copy_file(
|
|
10
|
+
src: StrPath,
|
|
11
|
+
dst: _StrPathT,
|
|
12
|
+
preserve_mode: bool | Literal[0, 1] = 1,
|
|
13
|
+
preserve_times: bool | Literal[0, 1] = 1,
|
|
14
|
+
update: bool | Literal[0, 1] = 0,
|
|
15
|
+
link: str | None = None,
|
|
16
|
+
verbose: bool | Literal[0, 1] = 1,
|
|
17
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
18
|
+
) -> tuple[_StrPathT | str, bool]: ...
|
|
19
|
+
@overload
|
|
3
20
|
def copy_file(
|
|
4
|
-
src:
|
|
5
|
-
dst:
|
|
6
|
-
preserve_mode: bool =
|
|
7
|
-
preserve_times: bool =
|
|
8
|
-
update: bool =
|
|
21
|
+
src: BytesPath,
|
|
22
|
+
dst: _BytesPathT,
|
|
23
|
+
preserve_mode: bool | Literal[0, 1] = 1,
|
|
24
|
+
preserve_times: bool | Literal[0, 1] = 1,
|
|
25
|
+
update: bool | Literal[0, 1] = 0,
|
|
9
26
|
link: str | None = None,
|
|
10
|
-
verbose: bool =
|
|
11
|
-
dry_run: bool =
|
|
12
|
-
) -> tuple[
|
|
13
|
-
|
|
14
|
-
def
|
|
27
|
+
verbose: bool | Literal[0, 1] = 1,
|
|
28
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
29
|
+
) -> tuple[_BytesPathT | bytes, bool]: ...
|
|
30
|
+
@overload
|
|
31
|
+
def move_file(
|
|
32
|
+
src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
|
|
33
|
+
) -> _StrPathT | str: ...
|
|
34
|
+
@overload
|
|
35
|
+
def move_file(
|
|
36
|
+
src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
|
|
37
|
+
) -> _BytesPathT | bytes: ...
|
|
38
|
+
def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ...
|
|
@@ -23,7 +23,11 @@ class FileList:
|
|
|
23
23
|
def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
|
|
24
24
|
@overload
|
|
25
25
|
def include_pattern(
|
|
26
|
-
self,
|
|
26
|
+
self,
|
|
27
|
+
pattern: str | Pattern[str],
|
|
28
|
+
anchor: bool | Literal[0, 1] = 1,
|
|
29
|
+
prefix: str | None = None,
|
|
30
|
+
is_regex: bool | Literal[0, 1] = 0,
|
|
27
31
|
) -> bool: ...
|
|
28
32
|
@overload
|
|
29
33
|
def exclude_pattern(
|
|
@@ -33,7 +37,11 @@ class FileList:
|
|
|
33
37
|
def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ...
|
|
34
38
|
@overload
|
|
35
39
|
def exclude_pattern(
|
|
36
|
-
self,
|
|
40
|
+
self,
|
|
41
|
+
pattern: str | Pattern[str],
|
|
42
|
+
anchor: bool | Literal[0, 1] = 1,
|
|
43
|
+
prefix: str | None = None,
|
|
44
|
+
is_regex: bool | Literal[0, 1] = 0,
|
|
37
45
|
) -> bool: ...
|
|
38
46
|
|
|
39
47
|
def findall(dir: str = ".") -> list[str]: ...
|
|
@@ -46,5 +54,5 @@ def translate_pattern(
|
|
|
46
54
|
def translate_pattern(pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> Pattern[str]: ...
|
|
47
55
|
@overload
|
|
48
56
|
def translate_pattern(
|
|
49
|
-
pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex:
|
|
57
|
+
pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: bool | Literal[0, 1] = 0
|
|
50
58
|
) -> Pattern[str]: ...
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
def spawn(
|
|
4
|
+
cmd: list[str], search_path: bool | Literal[0, 1] = 1, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
|
|
5
|
+
) -> None: ...
|
|
2
6
|
def find_executable(executable: str, path: str | None = None) -> str | None: ...
|
|
@@ -23,8 +23,10 @@ def get_config_vars() -> dict[str, str | int]: ...
|
|
|
23
23
|
def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
|
|
24
24
|
def get_config_h_filename() -> str: ...
|
|
25
25
|
def get_makefile_filename() -> str: ...
|
|
26
|
-
def get_python_inc(plat_specific: bool =
|
|
27
|
-
def get_python_lib(
|
|
26
|
+
def get_python_inc(plat_specific: bool | Literal[0, 1] = 0, prefix: str | None = None) -> str: ...
|
|
27
|
+
def get_python_lib(
|
|
28
|
+
plat_specific: bool | Literal[0, 1] = 0, standard_lib: bool | Literal[0, 1] = 0, prefix: str | None = None
|
|
29
|
+
) -> str: ...
|
|
28
30
|
def customize_compiler(compiler: CCompiler) -> None: ...
|
|
29
31
|
|
|
30
32
|
if sys.version_info < (3, 10):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import IO
|
|
1
|
+
from typing import IO, Literal
|
|
2
2
|
|
|
3
3
|
class TextFile:
|
|
4
4
|
def __init__(
|
|
@@ -6,12 +6,12 @@ class TextFile:
|
|
|
6
6
|
filename: str | None = None,
|
|
7
7
|
file: IO[str] | None = None,
|
|
8
8
|
*,
|
|
9
|
-
strip_comments: bool = ...,
|
|
10
|
-
lstrip_ws: bool = ...,
|
|
11
|
-
rstrip_ws: bool = ...,
|
|
12
|
-
skip_blanks: bool = ...,
|
|
13
|
-
join_lines: bool = ...,
|
|
14
|
-
collapse_join: bool = ...,
|
|
9
|
+
strip_comments: bool | Literal[0, 1] = ...,
|
|
10
|
+
lstrip_ws: bool | Literal[0, 1] = ...,
|
|
11
|
+
rstrip_ws: bool | Literal[0, 1] = ...,
|
|
12
|
+
skip_blanks: bool | Literal[0, 1] = ...,
|
|
13
|
+
join_lines: bool | Literal[0, 1] = ...,
|
|
14
|
+
collapse_join: bool | Literal[0, 1] = ...,
|
|
15
15
|
) -> None: ...
|
|
16
16
|
def open(self, filename: str) -> None: ...
|
|
17
17
|
def close(self) -> None: ...
|
|
@@ -5,22 +5,26 @@ from typing import Any, Literal
|
|
|
5
5
|
def get_host_platform() -> str: ...
|
|
6
6
|
def get_platform() -> str: ...
|
|
7
7
|
def convert_path(pathname: str) -> str: ...
|
|
8
|
-
def change_root(new_root:
|
|
8
|
+
def change_root(new_root: StrPath, pathname: StrPath) -> str: ...
|
|
9
9
|
def check_environ() -> None: ...
|
|
10
10
|
def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ...
|
|
11
11
|
def split_quoted(s: str) -> list[str]: ...
|
|
12
12
|
def execute(
|
|
13
|
-
func: Callable[..., object],
|
|
13
|
+
func: Callable[..., object],
|
|
14
|
+
args: tuple[Any, ...],
|
|
15
|
+
msg: str | None = None,
|
|
16
|
+
verbose: bool | Literal[0, 1] = 0,
|
|
17
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
14
18
|
) -> None: ...
|
|
15
19
|
def strtobool(val: str) -> Literal[0, 1]: ...
|
|
16
20
|
def byte_compile(
|
|
17
21
|
py_files: list[str],
|
|
18
22
|
optimize: int = 0,
|
|
19
|
-
force: bool =
|
|
23
|
+
force: bool | Literal[0, 1] = 0,
|
|
20
24
|
prefix: str | None = None,
|
|
21
25
|
base_dir: str | None = None,
|
|
22
|
-
verbose: bool =
|
|
23
|
-
dry_run: bool =
|
|
26
|
+
verbose: bool | Literal[0, 1] = 1,
|
|
27
|
+
dry_run: bool | Literal[0, 1] = 0,
|
|
24
28
|
direct: bool | None = None,
|
|
25
29
|
) -> None: ...
|
|
26
30
|
def rfc822_escape(header: str) -> str: ...
|
|
@@ -10,4 +10,4 @@ def is_enabled() -> bool: ...
|
|
|
10
10
|
|
|
11
11
|
if sys.platform != "win32":
|
|
12
12
|
def register(signum: int, file: FileDescriptorLike = ..., all_threads: bool = ..., chain: bool = ...) -> None: ...
|
|
13
|
-
def unregister(signum: int) -> None: ...
|
|
13
|
+
def unregister(signum: int, /) -> None: ...
|
|
@@ -52,6 +52,6 @@ class dircmp(Generic[AnyStr]):
|
|
|
52
52
|
def phase4(self) -> None: ...
|
|
53
53
|
def phase4_closure(self) -> None: ...
|
|
54
54
|
if sys.version_info >= (3, 9):
|
|
55
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
55
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
56
56
|
|
|
57
57
|
def clear_cache() -> None: ...
|
|
@@ -200,7 +200,7 @@ class FileInput(Iterator[AnyStr]):
|
|
|
200
200
|
def isfirstline(self) -> bool: ...
|
|
201
201
|
def isstdin(self) -> bool: ...
|
|
202
202
|
if sys.version_info >= (3, 9):
|
|
203
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
203
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
204
204
|
|
|
205
205
|
if sys.version_info >= (3, 10):
|
|
206
206
|
def hook_compressed(
|
|
@@ -132,7 +132,7 @@ class partial(Generic[_T]):
|
|
|
132
132
|
def __new__(cls, func: Callable[..., _T], /, *args: Any, **kwargs: Any) -> Self: ...
|
|
133
133
|
def __call__(self, /, *args: Any, **kwargs: Any) -> _T: ...
|
|
134
134
|
if sys.version_info >= (3, 9):
|
|
135
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
135
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
136
136
|
|
|
137
137
|
# With protocols, this could change into a generic protocol that defines __get__ and returns _T
|
|
138
138
|
_Descriptor: TypeAlias = Any
|
|
@@ -149,7 +149,7 @@ class partialmethod(Generic[_T]):
|
|
|
149
149
|
@property
|
|
150
150
|
def __isabstractmethod__(self) -> bool: ...
|
|
151
151
|
if sys.version_info >= (3, 9):
|
|
152
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
152
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
153
153
|
|
|
154
154
|
class _SingleDispatchCallable(Generic[_T]):
|
|
155
155
|
registry: types.MappingProxyType[Any, Callable[..., _T]]
|
|
@@ -196,7 +196,7 @@ class cached_property(Generic[_T_co]):
|
|
|
196
196
|
# __set__ is not defined at runtime, but @cached_property is designed to be settable
|
|
197
197
|
def __set__(self, instance: object, value: _T_co) -> None: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
|
198
198
|
if sys.version_info >= (3, 9):
|
|
199
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
199
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
200
200
|
|
|
201
201
|
if sys.version_info >= (3, 9):
|
|
202
202
|
def cache(user_function: Callable[..., _T], /) -> _lru_cache_wrapper[_T]: ...
|
|
@@ -20,6 +20,8 @@ __all__ = [
|
|
|
20
20
|
]
|
|
21
21
|
if sys.version_info >= (3, 12):
|
|
22
22
|
__all__ += ["islink"]
|
|
23
|
+
if sys.version_info >= (3, 13):
|
|
24
|
+
__all__ += ["isjunction", "isdevdrive", "lexists"]
|
|
23
25
|
|
|
24
26
|
# All overloads can return empty string. Ideally, Literal[""] would be a valid
|
|
25
27
|
# Iterable[T], so that list[T] | Literal[""] could be used as a return
|
|
@@ -50,3 +52,8 @@ def getctime(filename: FileDescriptorOrPath) -> float: ...
|
|
|
50
52
|
def samefile(f1: FileDescriptorOrPath, f2: FileDescriptorOrPath) -> bool: ...
|
|
51
53
|
def sameopenfile(fp1: int, fp2: int) -> bool: ...
|
|
52
54
|
def samestat(s1: os.stat_result, s2: os.stat_result) -> bool: ...
|
|
55
|
+
|
|
56
|
+
if sys.version_info >= (3, 13):
|
|
57
|
+
def isjunction(path: StrOrBytesPath) -> bool: ...
|
|
58
|
+
def isdevdrive(path: StrOrBytesPath) -> bool: ...
|
|
59
|
+
def lexists(path: StrOrBytesPath) -> bool: ...
|
|
@@ -23,6 +23,6 @@ class TopologicalSorter(Generic[_T]):
|
|
|
23
23
|
def get_ready(self) -> tuple[_T, ...]: ...
|
|
24
24
|
def static_order(self) -> Iterable[_T]: ...
|
|
25
25
|
if sys.version_info >= (3, 11):
|
|
26
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
26
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
27
27
|
|
|
28
28
|
class CycleError(ValueError): ...
|
|
@@ -12,8 +12,8 @@ _ReadBinaryMode: TypeAlias = Literal["r", "rb"]
|
|
|
12
12
|
_WriteBinaryMode: TypeAlias = Literal["a", "ab", "w", "wb", "x", "xb"]
|
|
13
13
|
_OpenTextMode: TypeAlias = Literal["rt", "at", "wt", "xt"]
|
|
14
14
|
|
|
15
|
-
READ:
|
|
16
|
-
WRITE:
|
|
15
|
+
READ: object # undocumented
|
|
16
|
+
WRITE: object # undocumented
|
|
17
17
|
|
|
18
18
|
FTEXT: int # actually Literal[1] # undocumented
|
|
19
19
|
FHCRC: int # actually Literal[2] # undocumented
|
|
@@ -86,7 +86,7 @@ class BadGzipFile(OSError): ...
|
|
|
86
86
|
|
|
87
87
|
class GzipFile(_compression.BaseStream):
|
|
88
88
|
myfileobj: FileIO | None
|
|
89
|
-
mode:
|
|
89
|
+
mode: object
|
|
90
90
|
name: str
|
|
91
91
|
compress: zlib._Compress
|
|
92
92
|
fileobj: _ReadableFileobj | _WritableFileobj
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
from enum import IntEnum
|
|
3
|
-
from typing import Literal
|
|
4
3
|
|
|
5
4
|
if sys.version_info >= (3, 11):
|
|
6
5
|
from enum import StrEnum
|
|
@@ -49,11 +48,19 @@ class HTTPStatus(IntEnum):
|
|
|
49
48
|
GONE = 410
|
|
50
49
|
LENGTH_REQUIRED = 411
|
|
51
50
|
PRECONDITION_FAILED = 412
|
|
51
|
+
if sys.version_info >= (3, 13):
|
|
52
|
+
CONTENT_TOO_LARGE = 413
|
|
52
53
|
REQUEST_ENTITY_TOO_LARGE = 413
|
|
54
|
+
if sys.version_info >= (3, 13):
|
|
55
|
+
URI_TOO_LONG = 414
|
|
53
56
|
REQUEST_URI_TOO_LONG = 414
|
|
54
57
|
UNSUPPORTED_MEDIA_TYPE = 415
|
|
58
|
+
if sys.version_info >= (3, 13):
|
|
59
|
+
RANGE_NOT_SATISFIABLE = 416
|
|
55
60
|
REQUESTED_RANGE_NOT_SATISFIABLE = 416
|
|
56
61
|
EXPECTATION_FAILED = 417
|
|
62
|
+
if sys.version_info >= (3, 13):
|
|
63
|
+
UNPROCESSABLE_CONTENT = 422
|
|
57
64
|
UNPROCESSABLE_ENTITY = 422
|
|
58
65
|
LOCKED = 423
|
|
59
66
|
FAILED_DEPENDENCY = 424
|
|
@@ -75,9 +82,9 @@ class HTTPStatus(IntEnum):
|
|
|
75
82
|
MISDIRECTED_REQUEST = 421
|
|
76
83
|
UNAVAILABLE_FOR_LEGAL_REASONS = 451
|
|
77
84
|
if sys.version_info >= (3, 9):
|
|
78
|
-
EARLY_HINTS
|
|
79
|
-
IM_A_TEAPOT
|
|
80
|
-
TOO_EARLY
|
|
85
|
+
EARLY_HINTS = 103
|
|
86
|
+
IM_A_TEAPOT = 418
|
|
87
|
+
TOO_EARLY = 425
|
|
81
88
|
if sys.version_info >= (3, 12):
|
|
82
89
|
@property
|
|
83
90
|
def is_informational(self) -> bool: ...
|
|
@@ -45,7 +45,7 @@ class Morsel(dict[str, Any], Generic[_T]):
|
|
|
45
45
|
def __eq__(self, morsel: object) -> bool: ...
|
|
46
46
|
def __setitem__(self, K: str, V: Any) -> None: ...
|
|
47
47
|
if sys.version_info >= (3, 9):
|
|
48
|
-
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
|
48
|
+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
|
49
49
|
|
|
50
50
|
class BaseCookie(dict[str, Morsel[_T]], Generic[_T]):
|
|
51
51
|
def __init__(self, input: _DataType | None = None) -> None: ...
|
|
@@ -64,7 +64,7 @@ class SourceLoader(ResourceLoader, ExecutionLoader, metaclass=ABCMeta):
|
|
|
64
64
|
|
|
65
65
|
# The base classes differ starting in 3.10:
|
|
66
66
|
if sys.version_info >= (3, 10):
|
|
67
|
-
# Please keep in sync with
|
|
67
|
+
# Please keep in sync with _typeshed.importlib.MetaPathFinderProtocol
|
|
68
68
|
class MetaPathFinder(metaclass=ABCMeta):
|
|
69
69
|
if sys.version_info < (3, 12):
|
|
70
70
|
def find_module(self, fullname: str, path: Sequence[str] | None) -> Loader | None: ...
|
|
@@ -85,7 +85,7 @@ if sys.version_info >= (3, 10):
|
|
|
85
85
|
def find_spec(self, fullname: str, target: types.ModuleType | None = ...) -> ModuleSpec | None: ...
|
|
86
86
|
|
|
87
87
|
else:
|
|
88
|
-
# Please keep in sync with
|
|
88
|
+
# Please keep in sync with _typeshed.importlib.MetaPathFinderProtocol
|
|
89
89
|
class MetaPathFinder(Finder):
|
|
90
90
|
def find_module(self, fullname: str, path: Sequence[str] | None) -> Loader | None: ...
|
|
91
91
|
def invalidate_caches(self) -> None: ...
|
|
@@ -3,6 +3,7 @@ import importlib.machinery
|
|
|
3
3
|
import sys
|
|
4
4
|
import types
|
|
5
5
|
from _typeshed import ReadableBuffer, StrOrBytesPath
|
|
6
|
+
from _typeshed.importlib import LoaderProtocol
|
|
6
7
|
from collections.abc import Callable
|
|
7
8
|
from typing import Any
|
|
8
9
|
from typing_extensions import ParamSpec
|
|
@@ -23,13 +24,13 @@ def source_from_cache(path: str) -> str: ...
|
|
|
23
24
|
def decode_source(source_bytes: ReadableBuffer) -> str: ...
|
|
24
25
|
def find_spec(name: str, package: str | None = None) -> importlib.machinery.ModuleSpec | None: ...
|
|
25
26
|
def spec_from_loader(
|
|
26
|
-
name: str, loader:
|
|
27
|
+
name: str, loader: LoaderProtocol | None, *, origin: str | None = None, is_package: bool | None = None
|
|
27
28
|
) -> importlib.machinery.ModuleSpec | None: ...
|
|
28
29
|
def spec_from_file_location(
|
|
29
30
|
name: str,
|
|
30
31
|
location: StrOrBytesPath | None = None,
|
|
31
32
|
*,
|
|
32
|
-
loader:
|
|
33
|
+
loader: LoaderProtocol | None = None,
|
|
33
34
|
submodule_search_locations: list[str] | None = ...,
|
|
34
35
|
) -> importlib.machinery.ModuleSpec | None: ...
|
|
35
36
|
def module_from_spec(spec: importlib.machinery.ModuleSpec) -> types.ModuleType: ...
|
|
@@ -318,6 +318,7 @@ class Signature:
|
|
|
318
318
|
def bind(self, *args: Any, **kwargs: Any) -> BoundArguments: ...
|
|
319
319
|
def bind_partial(self, *args: Any, **kwargs: Any) -> BoundArguments: ...
|
|
320
320
|
def replace(self, *, parameters: Sequence[Parameter] | type[_void] | None = ..., return_annotation: Any = ...) -> Self: ...
|
|
321
|
+
__replace__ = replace
|
|
321
322
|
if sys.version_info >= (3, 10):
|
|
322
323
|
@classmethod
|
|
323
324
|
def from_callable(
|
|
@@ -332,6 +333,8 @@ class Signature:
|
|
|
332
333
|
else:
|
|
333
334
|
@classmethod
|
|
334
335
|
def from_callable(cls, obj: _IntrospectableCallable, *, follow_wrapped: bool = True) -> Self: ...
|
|
336
|
+
if sys.version_info >= (3, 13):
|
|
337
|
+
def format(self, *, max_width: int | None = None) -> str: ...
|
|
335
338
|
|
|
336
339
|
def __eq__(self, other: object) -> bool: ...
|
|
337
340
|
def __hash__(self) -> int: ...
|
|
@@ -392,6 +395,9 @@ class Parameter:
|
|
|
392
395
|
default: Any = ...,
|
|
393
396
|
annotation: Any = ...,
|
|
394
397
|
) -> Self: ...
|
|
398
|
+
if sys.version_info >= (3, 13):
|
|
399
|
+
__replace__ = replace
|
|
400
|
+
|
|
395
401
|
def __eq__(self, other: object) -> bool: ...
|
|
396
402
|
def __hash__(self) -> int: ...
|
|
397
403
|
|
|
@@ -7,14 +7,14 @@ if sys.version_info >= (3, 9):
|
|
|
7
7
|
else:
|
|
8
8
|
__all__ = ["iskeyword", "kwlist"]
|
|
9
9
|
|
|
10
|
-
def iskeyword(s: str) -> bool: ...
|
|
10
|
+
def iskeyword(s: str, /) -> bool: ...
|
|
11
11
|
|
|
12
12
|
# a list at runtime, but you're not meant to mutate it;
|
|
13
13
|
# type it as a sequence
|
|
14
14
|
kwlist: Final[Sequence[str]]
|
|
15
15
|
|
|
16
16
|
if sys.version_info >= (3, 9):
|
|
17
|
-
def issoftkeyword(s: str) -> bool: ...
|
|
17
|
+
def issoftkeyword(s: str, /) -> bool: ...
|
|
18
18
|
|
|
19
19
|
# a list at runtime, but you're not meant to mutate it;
|
|
20
20
|
# type it as a sequence
|