basedpyright 1.7.0 → 1.8.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/README.md +2 -2
- 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 +10 -11
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/builtins.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/optparse.pyi +57 -54
- package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +2 -0
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageSequence.pyi +11 -8
- package/dist/typeshed-fallback/stubs/croniter/croniter/croniter.pyi +5 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/nodes.pyi +84 -26
- package/dist/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +9 -2
- package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hvac/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/adapters.pyi +60 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/__init__.pyi +7 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/__init__.pyi +41 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/approle.pyi +54 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/aws.pyi +110 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/azure.pyi +49 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/cert.pyi +41 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/gcp.pyi +44 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/github.pyi +21 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/jwt.pyi +60 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/kubernetes.pyi +35 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/ldap.pyi +60 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/legacy_mfa.pyi +15 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/oidc.pyi +35 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/okta.pyi +29 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/radius.pyi +23 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/token.pyi +74 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/userpass.pyi +15 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/__init__.pyi +39 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/active_directory.pyi +28 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/aws.pyi +43 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/azure.pyi +23 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/consul.pyi +23 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/database.pyi +47 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/gcp.pyi +73 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/identity.pyi +163 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/kv.pyi +18 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/kv_v1.pyi +11 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/kv_v2.pyi +37 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/pki.pyi +50 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/rabbitmq.pyi +18 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/ssh.pyi +73 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/transform.pyi +109 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/transit.pyi +114 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/__init__.pyi +63 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/audit.pyi +16 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/auth.pyi +30 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/capabilities.pyi +6 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/health.pyi +16 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/init.pyi +18 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/key.pyi +29 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/leader.pyi +5 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/lease.pyi +11 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/mount.pyi +36 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/namespace.pyi +6 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/policies.pyi +15 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/policy.pyi +7 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/quota.pyi +19 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/raft.pyi +18 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/seal.pyi +10 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/system_backend_mixin.pyi +8 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/system_backend/wrapping.pyi +6 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/vault_api_base.pyi +7 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/vault_api_category.pyi +24 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/aws_utils.pyi +9 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/approle.pyi +4 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/aws.pyi +7 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/azure.pyi +3 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/client.pyi +8 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/gcp.pyi +8 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/identity.pyi +3 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/transit.pyi +12 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/exceptions.pyi +42 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/utils.pyi +45 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/v1/__init__.pyi +72 -0
- package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi +1 -0
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/query_api.pyi +12 -9
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/query_api_async.pyi +17 -9
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/util/helpers.pyi +4 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/domain/organization.pyi +3 -3
- package/dist/typeshed-fallback/stubs/paho-mqtt/METADATA.toml +1 -0
- package/dist/typeshed-fallback/stubs/pika/pika/compat.pyi +4 -4
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/__init__.pyi +8 -2
- package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/relativedelta.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pywin32/_win32typing.pyi +0 -3
- package/dist/typeshed-fallback/stubs/pywin32/win32/lib/win32evtlogutil.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/lib/win32pdhquery.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/odbc.pyi +12 -10
- package/dist/typeshed-fallback/stubs/pywin32/win32com/server/policy.pyi +1 -1
- package/dist/typeshed-fallback/stubs/requests-oauthlib/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/distutils/archive_util.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/ccompiler.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/cmd.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/bdist_rpm.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/build.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/build_clib.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/build_ext.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/build_py.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/install.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/install_scripts.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/register.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/sdist.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/command/upload.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/config.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/dep_util.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/dist.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/errors.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/extension.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/filelist.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/sysconfig.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/util.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,10 @@ Typeshed contains external type annotations for the Python standard library
|
|
|
10
10
|
and Python builtins, as well as third party packages as contributed by
|
|
11
11
|
people external to those projects.
|
|
12
12
|
|
|
13
|
-
This data can e.g. be used for static analysis, type checking
|
|
13
|
+
This data can e.g. be used for static analysis, type checking, type inference,
|
|
14
|
+
and autocompletion.
|
|
14
15
|
|
|
15
|
-
For information on how to use
|
|
16
|
+
For information on how to use typeshed, read below. Information for
|
|
16
17
|
contributors can be found in [CONTRIBUTING.md](CONTRIBUTING.md). **Please read
|
|
17
18
|
it before submitting pull requests; do not report issues with annotations to
|
|
18
19
|
the project the stubs are for, but instead report them here to typeshed.**
|
|
@@ -30,15 +31,15 @@ If you're just using a type checker ([mypy](https://github.com/python/mypy/),
|
|
|
30
31
|
developing it, you don't need to interact with the typeshed repo at
|
|
31
32
|
all: a copy of standard library part of typeshed is bundled with type checkers.
|
|
32
33
|
And type stubs for third party packages and modules you are using can
|
|
33
|
-
be installed from PyPI. For example, if you are using `
|
|
34
|
+
be installed from PyPI. For example, if you are using `Pillow` and `requests`,
|
|
34
35
|
you can install the type stubs using
|
|
35
36
|
|
|
36
37
|
```bash
|
|
37
|
-
$ pip install types-
|
|
38
|
+
$ pip install types-Pillow types-requests
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
These PyPI packages follow [PEP 561](http://www.python.org/dev/peps/pep-0561/)
|
|
41
|
-
and are automatically released (
|
|
42
|
+
and are automatically released (up to once a day) by
|
|
42
43
|
[typeshed internal machinery](https://github.com/typeshed-internal/stub_uploader).
|
|
43
44
|
|
|
44
45
|
Type checkers should be able to use these stub packages when installed. For more
|
|
@@ -49,13 +50,11 @@ details, see the documentation for your type checker.
|
|
|
49
50
|
Version numbers of third-party stub packages consist of at least four parts.
|
|
50
51
|
All parts of the stub version, except for the last part, correspond to the
|
|
51
52
|
version of the runtime package being stubbed. For example, if the `types-foo`
|
|
52
|
-
package has version `1.2.0.
|
|
53
|
+
package has version `1.2.0.20240309`, this guarantees that the `types-foo` package
|
|
53
54
|
contains stubs targeted against `foo==1.2.*` and tested against the latest
|
|
54
55
|
version of `foo` matching that specifier. In this example, the final element
|
|
55
|
-
of the version (
|
|
56
|
-
|
|
57
|
-
aiming to provide annotations for `foo==1.2.*`), then the version of
|
|
58
|
-
`types-foo` would increment to `1.2.0.8`.
|
|
56
|
+
of the version number (20240309) indicates that the stub package was pushed on
|
|
57
|
+
March 9, 2024.
|
|
59
58
|
|
|
60
59
|
At typeshed, we try to keep breaking changes to a minimum. However, due to the
|
|
61
60
|
nature of stubs, any version bump can introduce changes that might make your
|
|
@@ -100,7 +99,7 @@ a problem arises that can't easily be fixed.
|
|
|
100
99
|
### The `_typeshed` package
|
|
101
100
|
|
|
102
101
|
typeshed includes a package `_typeshed` as part of the standard library.
|
|
103
|
-
This package and its submodules
|
|
102
|
+
This package and its submodules contain utility types, but are not
|
|
104
103
|
available at runtime. For more information about how to use this package,
|
|
105
104
|
[see the `stdlib/_typeshed` directory](https://github.com/python/typeshed/tree/main/stdlib/_typeshed).
|
|
106
105
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4df0725b4881f2e82defa0f263b561ce867e7919
|
|
@@ -1865,6 +1865,7 @@ class MemoryError(Exception): ...
|
|
|
1865
1865
|
|
|
1866
1866
|
class NameError(Exception):
|
|
1867
1867
|
if sys.version_info >= (3, 10):
|
|
1868
|
+
def __init__(self, *args: object, name: str | None = ...) -> None: ...
|
|
1868
1869
|
name: str
|
|
1869
1870
|
|
|
1870
1871
|
class ReferenceError(Exception): ...
|
|
@@ -243,7 +243,7 @@ class InitVar(Generic[_T], metaclass=_InitVarMeta):
|
|
|
243
243
|
if sys.version_info >= (3, 12):
|
|
244
244
|
def make_dataclass(
|
|
245
245
|
cls_name: str,
|
|
246
|
-
fields: Iterable[str | tuple[str,
|
|
246
|
+
fields: Iterable[str | tuple[str, Any] | tuple[str, Any, Any]],
|
|
247
247
|
*,
|
|
248
248
|
bases: tuple[type, ...] = (),
|
|
249
249
|
namespace: dict[str, Any] | None = None,
|
|
@@ -263,7 +263,7 @@ if sys.version_info >= (3, 12):
|
|
|
263
263
|
elif sys.version_info >= (3, 11):
|
|
264
264
|
def make_dataclass(
|
|
265
265
|
cls_name: str,
|
|
266
|
-
fields: Iterable[str | tuple[str,
|
|
266
|
+
fields: Iterable[str | tuple[str, Any] | tuple[str, Any, Any]],
|
|
267
267
|
*,
|
|
268
268
|
bases: tuple[type, ...] = (),
|
|
269
269
|
namespace: dict[str, Any] | None = None,
|
|
@@ -282,7 +282,7 @@ elif sys.version_info >= (3, 11):
|
|
|
282
282
|
elif sys.version_info >= (3, 10):
|
|
283
283
|
def make_dataclass(
|
|
284
284
|
cls_name: str,
|
|
285
|
-
fields: Iterable[str | tuple[str,
|
|
285
|
+
fields: Iterable[str | tuple[str, Any] | tuple[str, Any, Any]],
|
|
286
286
|
*,
|
|
287
287
|
bases: tuple[type, ...] = (),
|
|
288
288
|
namespace: dict[str, Any] | None = None,
|
|
@@ -300,7 +300,7 @@ elif sys.version_info >= (3, 10):
|
|
|
300
300
|
else:
|
|
301
301
|
def make_dataclass(
|
|
302
302
|
cls_name: str,
|
|
303
|
-
fields: Iterable[str | tuple[str,
|
|
303
|
+
fields: Iterable[str | tuple[str, Any] | tuple[str, Any, Any]],
|
|
304
304
|
*,
|
|
305
305
|
bases: tuple[type, ...] = (),
|
|
306
306
|
namespace: dict[str, Any] | None = None,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
1
2
|
from abc import abstractmethod
|
|
2
3
|
from collections.abc import Callable, Iterable, Mapping, Sequence
|
|
3
|
-
from typing import IO, Any, AnyStr, overload
|
|
4
|
+
from typing import IO, Any, AnyStr, Literal, overload
|
|
4
5
|
|
|
5
6
|
__all__ = [
|
|
6
7
|
"Option",
|
|
@@ -26,8 +27,8 @@ NO_DEFAULT: tuple[str, ...]
|
|
|
26
27
|
SUPPRESS_HELP: str
|
|
27
28
|
SUPPRESS_USAGE: str
|
|
28
29
|
|
|
29
|
-
def check_builtin(option: Option, opt
|
|
30
|
-
def check_choice(option: Option, opt
|
|
30
|
+
def check_builtin(option: Option, opt, value: str): ...
|
|
31
|
+
def check_choice(option: Option, opt, value: str) -> str: ...
|
|
31
32
|
|
|
32
33
|
class OptParseError(Exception):
|
|
33
34
|
msg: str
|
|
@@ -54,26 +55,26 @@ class HelpFormatter:
|
|
|
54
55
|
_short_opt_fmt: str
|
|
55
56
|
current_indent: int
|
|
56
57
|
default_tag: str
|
|
57
|
-
help_position:
|
|
58
|
-
help_width: Any
|
|
58
|
+
help_position: int
|
|
59
|
+
help_width: int | Any # initialized as None and computed later as int when storing option strings
|
|
59
60
|
indent_increment: int
|
|
60
61
|
level: int
|
|
61
62
|
max_help_position: int
|
|
62
63
|
option_strings: dict[Option, str]
|
|
63
64
|
parser: OptionParser
|
|
64
|
-
short_first:
|
|
65
|
+
short_first: Incomplete
|
|
65
66
|
width: int
|
|
66
67
|
def __init__(self, indent_increment: int, max_help_position: int, width: int | None, short_first: int) -> None: ...
|
|
67
68
|
def dedent(self) -> None: ...
|
|
68
69
|
def expand_default(self, option: Option) -> str: ...
|
|
69
|
-
def format_description(self, description: str) -> str: ...
|
|
70
|
-
def format_epilog(self, epilog: str) -> str: ...
|
|
70
|
+
def format_description(self, description: str | None) -> str: ...
|
|
71
|
+
def format_epilog(self, epilog: str | None) -> str: ...
|
|
71
72
|
@abstractmethod
|
|
72
|
-
def format_heading(self, heading:
|
|
73
|
+
def format_heading(self, heading: str) -> str: ...
|
|
73
74
|
def format_option(self, option: Option) -> str: ...
|
|
74
75
|
def format_option_strings(self, option: Option) -> str: ...
|
|
75
76
|
@abstractmethod
|
|
76
|
-
def format_usage(self, usage:
|
|
77
|
+
def format_usage(self, usage: str) -> str: ...
|
|
77
78
|
def indent(self) -> None: ...
|
|
78
79
|
def set_long_opt_delimiter(self, delim: str) -> None: ...
|
|
79
80
|
def set_parser(self, parser: OptionParser) -> None: ...
|
|
@@ -98,25 +99,25 @@ class Option:
|
|
|
98
99
|
ACTIONS: tuple[str, ...]
|
|
99
100
|
ALWAYS_TYPED_ACTIONS: tuple[str, ...]
|
|
100
101
|
ATTRS: list[str]
|
|
101
|
-
CHECK_METHODS: list[Callable[...,
|
|
102
|
+
CHECK_METHODS: list[Callable[..., Incomplete]] | None
|
|
102
103
|
CONST_ACTIONS: tuple[str, ...]
|
|
103
104
|
STORE_ACTIONS: tuple[str, ...]
|
|
104
105
|
TYPED_ACTIONS: tuple[str, ...]
|
|
105
106
|
TYPES: tuple[str, ...]
|
|
106
|
-
TYPE_CHECKER: dict[str, Callable[
|
|
107
|
+
TYPE_CHECKER: dict[str, Callable[[Option, str, Incomplete], Any]]
|
|
107
108
|
_long_opts: list[str]
|
|
108
109
|
_short_opts: list[str]
|
|
109
110
|
action: str
|
|
110
111
|
dest: str | None
|
|
111
|
-
default:
|
|
112
|
+
default: Incomplete
|
|
112
113
|
nargs: int
|
|
113
|
-
type:
|
|
114
|
-
callback: Callable[...,
|
|
115
|
-
callback_args: tuple[
|
|
116
|
-
callback_kwargs: dict[str,
|
|
114
|
+
type: Incomplete
|
|
115
|
+
callback: Callable[..., Incomplete] | None
|
|
116
|
+
callback_args: tuple[Incomplete, ...] | None
|
|
117
|
+
callback_kwargs: dict[str, Incomplete] | None
|
|
117
118
|
help: str | None
|
|
118
119
|
metavar: str | None
|
|
119
|
-
def __init__(self, *opts: str | None, **attrs
|
|
120
|
+
def __init__(self, *opts: str | None, **attrs) -> None: ...
|
|
120
121
|
def _check_action(self) -> None: ...
|
|
121
122
|
def _check_callback(self) -> None: ...
|
|
122
123
|
def _check_choice(self) -> None: ...
|
|
@@ -125,13 +126,13 @@ class Option:
|
|
|
125
126
|
def _check_nargs(self) -> None: ...
|
|
126
127
|
def _check_opt_strings(self, opts: Iterable[str | None]) -> list[str]: ...
|
|
127
128
|
def _check_type(self) -> None: ...
|
|
128
|
-
def _set_attrs(self, attrs: dict[str,
|
|
129
|
+
def _set_attrs(self, attrs: dict[str, Incomplete]) -> None: ...
|
|
129
130
|
def _set_opt_strings(self, opts: Iterable[str]) -> None: ...
|
|
130
|
-
def check_value(self, opt: str, value
|
|
131
|
-
def convert_value(self, opt: str, value
|
|
131
|
+
def check_value(self, opt: str, value): ...
|
|
132
|
+
def convert_value(self, opt: str, value): ...
|
|
132
133
|
def get_opt_string(self) -> str: ...
|
|
133
|
-
def process(self, opt
|
|
134
|
-
def take_action(self, action: str, dest: str, opt
|
|
134
|
+
def process(self, opt, value, values, parser: OptionParser) -> int: ...
|
|
135
|
+
def take_action(self, action: str, dest: str, opt, value, values, parser: OptionParser) -> int: ...
|
|
135
136
|
def takes_value(self) -> bool: ...
|
|
136
137
|
|
|
137
138
|
make_option = Option
|
|
@@ -140,28 +141,30 @@ class OptionContainer:
|
|
|
140
141
|
_long_opt: dict[str, Option]
|
|
141
142
|
_short_opt: dict[str, Option]
|
|
142
143
|
conflict_handler: str
|
|
143
|
-
defaults: dict[str,
|
|
144
|
-
description:
|
|
144
|
+
defaults: dict[str, Incomplete]
|
|
145
|
+
description: str | None
|
|
145
146
|
option_class: type[Option]
|
|
146
|
-
def __init__(
|
|
147
|
-
|
|
147
|
+
def __init__(
|
|
148
|
+
self, option_class: type[Option], conflict_handler: Literal["error", "resolve"], description: str | None
|
|
149
|
+
) -> None: ...
|
|
150
|
+
def _check_conflict(self, option: Option) -> None: ...
|
|
148
151
|
def _create_option_mappings(self) -> None: ...
|
|
149
152
|
def _share_option_mappings(self, parser: OptionParser) -> None: ...
|
|
150
153
|
@overload
|
|
151
154
|
def add_option(self, opt: Option) -> Option: ...
|
|
152
155
|
@overload
|
|
153
|
-
def add_option(self, *args: str | None, **kwargs
|
|
156
|
+
def add_option(self, arg: str, /, *args: str | None, **kwargs) -> Option: ...
|
|
154
157
|
def add_options(self, option_list: Iterable[Option]) -> None: ...
|
|
155
158
|
def destroy(self) -> None: ...
|
|
156
|
-
def
|
|
157
|
-
def
|
|
158
|
-
def
|
|
159
|
-
def get_description(self) ->
|
|
159
|
+
def format_option_help(self, formatter: HelpFormatter) -> str: ...
|
|
160
|
+
def format_description(self, formatter: HelpFormatter) -> str: ...
|
|
161
|
+
def format_help(self, formatter: HelpFormatter) -> str: ...
|
|
162
|
+
def get_description(self) -> str | None: ...
|
|
160
163
|
def get_option(self, opt_str: str) -> Option | None: ...
|
|
161
164
|
def has_option(self, opt_str: str) -> bool: ...
|
|
162
165
|
def remove_option(self, opt_str: str) -> None: ...
|
|
163
|
-
def set_conflict_handler(self, handler:
|
|
164
|
-
def set_description(self, description:
|
|
166
|
+
def set_conflict_handler(self, handler: Literal["error", "resolve"]) -> None: ...
|
|
167
|
+
def set_description(self, description: str | None) -> None: ...
|
|
165
168
|
|
|
166
169
|
class OptionGroup(OptionContainer):
|
|
167
170
|
option_list: list[Option]
|
|
@@ -172,15 +175,15 @@ class OptionGroup(OptionContainer):
|
|
|
172
175
|
def set_title(self, title: str) -> None: ...
|
|
173
176
|
|
|
174
177
|
class Values:
|
|
175
|
-
def __init__(self, defaults: Mapping[str,
|
|
176
|
-
def _update(self, dict: Mapping[str,
|
|
177
|
-
def _update_careful(self, dict: Mapping[str,
|
|
178
|
-
def _update_loose(self, dict: Mapping[str,
|
|
179
|
-
def ensure_value(self, attr: str, value
|
|
178
|
+
def __init__(self, defaults: Mapping[str, Incomplete] | None = None) -> None: ...
|
|
179
|
+
def _update(self, dict: Mapping[str, Incomplete], mode) -> None: ...
|
|
180
|
+
def _update_careful(self, dict: Mapping[str, Incomplete]) -> None: ...
|
|
181
|
+
def _update_loose(self, dict: Mapping[str, Incomplete]) -> None: ...
|
|
182
|
+
def ensure_value(self, attr: str, value): ...
|
|
180
183
|
def read_file(self, filename: str, mode: str = "careful") -> None: ...
|
|
181
184
|
def read_module(self, modname: str, mode: str = "careful") -> None: ...
|
|
182
|
-
def __getattr__(self, name: str)
|
|
183
|
-
def __setattr__(self, name: str, value
|
|
185
|
+
def __getattr__(self, name: str): ...
|
|
186
|
+
def __setattr__(self, name: str, value, /) -> None: ...
|
|
184
187
|
def __eq__(self, other: object) -> bool: ...
|
|
185
188
|
|
|
186
189
|
class OptionParser(OptionContainer):
|
|
@@ -190,9 +193,9 @@ class OptionParser(OptionContainer):
|
|
|
190
193
|
largs: list[str] | None
|
|
191
194
|
option_groups: list[OptionGroup]
|
|
192
195
|
option_list: list[Option]
|
|
193
|
-
process_default_values:
|
|
196
|
+
process_default_values: bool
|
|
194
197
|
prog: str | None
|
|
195
|
-
rargs: list[
|
|
198
|
+
rargs: list[str] | None
|
|
196
199
|
standard_option_list: list[Option]
|
|
197
200
|
usage: str | None
|
|
198
201
|
values: Values | None
|
|
@@ -214,28 +217,28 @@ class OptionParser(OptionContainer):
|
|
|
214
217
|
def _add_version_option(self) -> None: ...
|
|
215
218
|
def _create_option_list(self) -> None: ...
|
|
216
219
|
def _get_all_options(self) -> list[Option]: ...
|
|
217
|
-
def _get_args(self, args: Iterable[
|
|
220
|
+
def _get_args(self, args: Iterable[Incomplete]) -> list[Incomplete]: ...
|
|
218
221
|
def _init_parsing_state(self) -> None: ...
|
|
219
222
|
def _match_long_opt(self, opt: str) -> str: ...
|
|
220
223
|
def _populate_option_list(self, option_list: Iterable[Option], add_help: bool = True) -> None: ...
|
|
221
|
-
def _process_args(self, largs: list[
|
|
222
|
-
def _process_long_opt(self, rargs: list[
|
|
223
|
-
def _process_short_opts(self, rargs: list[
|
|
224
|
+
def _process_args(self, largs: list[Incomplete], rargs: list[Incomplete], values: Values) -> None: ...
|
|
225
|
+
def _process_long_opt(self, rargs: list[Incomplete], values) -> None: ...
|
|
226
|
+
def _process_short_opts(self, rargs: list[Incomplete], values) -> None: ...
|
|
224
227
|
@overload
|
|
225
228
|
def add_option_group(self, opt_group: OptionGroup, /) -> OptionGroup: ...
|
|
226
229
|
@overload
|
|
227
|
-
def add_option_group(self, *args
|
|
230
|
+
def add_option_group(self, *args, **kwargs) -> OptionGroup: ...
|
|
228
231
|
def check_values(self, values: Values, args: list[str]) -> tuple[Values, list[str]]: ...
|
|
229
232
|
def disable_interspersed_args(self) -> None: ...
|
|
230
233
|
def enable_interspersed_args(self) -> None: ...
|
|
231
234
|
def error(self, msg: str) -> None: ...
|
|
232
235
|
def exit(self, status: int = 0, msg: str | None = None) -> None: ...
|
|
233
|
-
def expand_prog_name(self, s: str
|
|
234
|
-
def format_epilog(self, formatter: HelpFormatter) ->
|
|
236
|
+
def expand_prog_name(self, s: str) -> str: ...
|
|
237
|
+
def format_epilog(self, formatter: HelpFormatter) -> str: ...
|
|
235
238
|
def format_help(self, formatter: HelpFormatter | None = None) -> str: ...
|
|
236
239
|
def format_option_help(self, formatter: HelpFormatter | None = None) -> str: ...
|
|
237
240
|
def get_default_values(self) -> Values: ...
|
|
238
|
-
def get_option_group(self, opt_str: str) ->
|
|
241
|
+
def get_option_group(self, opt_str: str) -> OptionGroup | None: ...
|
|
239
242
|
def get_prog_name(self) -> str: ...
|
|
240
243
|
def get_usage(self) -> str: ...
|
|
241
244
|
def get_version(self) -> str: ...
|
|
@@ -246,7 +249,7 @@ class OptionParser(OptionContainer):
|
|
|
246
249
|
def print_usage(self, file: IO[str] | None = None) -> None: ...
|
|
247
250
|
def print_help(self, file: IO[str] | None = None) -> None: ...
|
|
248
251
|
def print_version(self, file: IO[str] | None = None) -> None: ...
|
|
249
|
-
def set_default(self, dest
|
|
250
|
-
def set_defaults(self, **kwargs
|
|
251
|
-
def set_process_default_values(self, process
|
|
252
|
+
def set_default(self, dest, value) -> None: ...
|
|
253
|
+
def set_defaults(self, **kwargs) -> None: ...
|
|
254
|
+
def set_process_default_values(self, process) -> None: ...
|
|
252
255
|
def set_usage(self, usage: str) -> None: ...
|
|
@@ -32,6 +32,8 @@ class XMLParserType:
|
|
|
32
32
|
def ExternalEntityParserCreate(self, context: str | None, encoding: str = ..., /) -> XMLParserType: ...
|
|
33
33
|
def SetParamEntityParsing(self, flag: int, /) -> int: ...
|
|
34
34
|
def UseForeignDTD(self, flag: bool = True, /) -> None: ...
|
|
35
|
+
def GetReparseDeferralEnabled(self) -> bool: ...
|
|
36
|
+
def SetReparseDeferralEnabled(self, enabled: bool, /) -> None: ...
|
|
35
37
|
@property
|
|
36
38
|
def intern(self) -> dict[str, str]: ...
|
|
37
39
|
buffer_size: int
|
|
@@ -250,6 +250,7 @@ class XMLPullParser:
|
|
|
250
250
|
# Second element in the tuple could be `Element`, `tuple[str, str]` or `None`.
|
|
251
251
|
# Use `Any` to avoid false-positive errors.
|
|
252
252
|
def read_events(self) -> Iterator[tuple[str, Any]]: ...
|
|
253
|
+
def flush(self) -> None: ...
|
|
253
254
|
|
|
254
255
|
def XML(text: str | ReadableBuffer, parser: XMLParser | None = None) -> Element: ...
|
|
255
256
|
def XMLID(text: str | ReadableBuffer, parser: XMLParser | None = None) -> tuple[Element, dict[str, Element]]: ...
|
|
@@ -323,3 +324,4 @@ class XMLParser:
|
|
|
323
324
|
def __init__(self, *, target: Any = ..., encoding: str | None = ...) -> None: ...
|
|
324
325
|
def close(self) -> Any: ...
|
|
325
326
|
def feed(self, data: str | ReadableBuffer, /) -> None: ...
|
|
327
|
+
def flush(self) -> None: ...
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
from
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
from typing_extensions import Self
|
|
3
|
+
|
|
4
|
+
from .Image import Image
|
|
2
5
|
|
|
3
6
|
class Iterator:
|
|
4
|
-
im:
|
|
5
|
-
position:
|
|
6
|
-
def __init__(self, im) -> None: ...
|
|
7
|
-
def __getitem__(self, ix): ...
|
|
8
|
-
def __iter__(self): ...
|
|
9
|
-
def __next__(self): ...
|
|
7
|
+
im: Image
|
|
8
|
+
position: int
|
|
9
|
+
def __init__(self, im: Image) -> None: ...
|
|
10
|
+
def __getitem__(self, ix: int) -> Image: ...
|
|
11
|
+
def __iter__(self) -> Self: ...
|
|
12
|
+
def __next__(self) -> Image: ...
|
|
10
13
|
|
|
11
|
-
def all_frames(im, func:
|
|
14
|
+
def all_frames(im: Image | list[Image], func: Callable[[Image], Image] | None = None) -> list[Image]: ...
|
|
@@ -36,7 +36,7 @@ class CroniterNotAlphaError(CroniterError): ...
|
|
|
36
36
|
def datetime_to_timestamp(d: datetime.datetime) -> float: ...
|
|
37
37
|
|
|
38
38
|
class croniter(Iterator[Any]):
|
|
39
|
-
MONTHS_IN_YEAR: Final
|
|
39
|
+
MONTHS_IN_YEAR: Final = 12
|
|
40
40
|
RANGES: Final[tuple[tuple[int, int], tuple[int, int], tuple[int, int], tuple[int, int], tuple[int, int], tuple[int, int]]]
|
|
41
41
|
DAYS: Final[
|
|
42
42
|
tuple[
|
|
@@ -106,6 +106,10 @@ class croniter(Iterator[Any]):
|
|
|
106
106
|
def is_valid(cls, expression: str, hash_id: bytes | None = None) -> bool: ...
|
|
107
107
|
@classmethod
|
|
108
108
|
def match(cls, cron_expression: str, testdate: float | datetime.datetime | None, day_or: bool = True) -> bool: ...
|
|
109
|
+
@classmethod
|
|
110
|
+
def match_range(
|
|
111
|
+
cls, cron_expression: str, from_datetime: datetime.datetime, to_datetime: datetime.datetime, day_or: bool = True
|
|
112
|
+
) -> bool: ...
|
|
109
113
|
|
|
110
114
|
def croniter_range(
|
|
111
115
|
start: float | datetime.datetime,
|
|
@@ -104,15 +104,25 @@ class Text(Node, str):
|
|
|
104
104
|
def rstrip(self, chars: str | None = None) -> str: ...
|
|
105
105
|
def lstrip(self, chars: str | None = None) -> str: ...
|
|
106
106
|
|
|
107
|
+
_T = TypeVar("_T")
|
|
108
|
+
|
|
107
109
|
class Element(Node):
|
|
110
|
+
local_attributes: ClassVar[Sequence[str]]
|
|
111
|
+
basic_attributes: ClassVar[Sequence[str]]
|
|
112
|
+
list_attributes: ClassVar[Sequence[str]]
|
|
113
|
+
known_attributes: ClassVar[Sequence[str]]
|
|
114
|
+
tagname: str
|
|
115
|
+
child_text_separator: ClassVar[str]
|
|
116
|
+
attributes: dict[str, Any]
|
|
108
117
|
children: list[Node]
|
|
109
118
|
rawsource: str
|
|
110
|
-
def __init__(self, rawsource: str = "", *children: Node, **attributes): ...
|
|
119
|
+
def __init__(self, rawsource: str = "", *children: Node, **attributes: Any) -> None: ...
|
|
120
|
+
def shortrepr(self) -> str: ...
|
|
121
|
+
def starttag(self, quoteattr: Callable[[str], str] | None = None) -> str: ...
|
|
122
|
+
def endtag(self) -> str: ...
|
|
123
|
+
def emptytag(self) -> str: ...
|
|
111
124
|
def __len__(self) -> int: ...
|
|
112
125
|
def __contains__(self, key: str | Node) -> bool: ...
|
|
113
|
-
# '__iter__' is added as workaround, since mypy doesn't support classes that are iterable via '__getitem__'
|
|
114
|
-
# see https://github.com/python/typeshed/pull/10099#issuecomment-1528789395
|
|
115
|
-
def __iter__(self) -> Iterator[Node]: ...
|
|
116
126
|
@overload
|
|
117
127
|
def __getitem__(self, key: str) -> Any: ...
|
|
118
128
|
@overload
|
|
@@ -129,19 +139,78 @@ class Element(Node):
|
|
|
129
139
|
def __add__(self, other: list[Node]) -> list[Node]: ...
|
|
130
140
|
def __radd__(self, other: list[Node]) -> list[Node]: ...
|
|
131
141
|
def __iadd__(self, other: Node | Iterable[Node]) -> Self: ...
|
|
132
|
-
def copy(self) -> Self: ...
|
|
133
|
-
def deepcopy(self) -> Self: ...
|
|
134
|
-
def pformat(self, indent: str = " ", level: int = 0) -> str: ...
|
|
135
142
|
def astext(self) -> str: ...
|
|
136
|
-
def
|
|
137
|
-
def
|
|
143
|
+
def non_default_attributes(self) -> dict[str, Any]: ...
|
|
144
|
+
def attlist(self) -> list[tuple[str, Any]]: ...
|
|
145
|
+
@overload
|
|
146
|
+
def get(self, key: str) -> Any: ...
|
|
147
|
+
@overload
|
|
148
|
+
def get(self, key: str, failobj: _T) -> _T: ...
|
|
149
|
+
def hasattr(self, attr: str) -> bool: ...
|
|
150
|
+
def delattr(self, attr: str) -> None: ...
|
|
151
|
+
@overload
|
|
152
|
+
def setdefault(self, key: str) -> Any: ...
|
|
153
|
+
@overload
|
|
154
|
+
def setdefault(self, key: str, failobj: _T) -> Any | _T: ...
|
|
155
|
+
has_key = hasattr
|
|
156
|
+
def get_language_code(self, fallback: str = "") -> str: ...
|
|
157
|
+
def append(self, item: Node) -> None: ...
|
|
158
|
+
def extend(self, item: Iterable[Node]) -> None: ...
|
|
138
159
|
def insert(self, index: SupportsIndex, item: Node | Iterable[Node] | None) -> None: ...
|
|
160
|
+
def pop(self, i: int = -1) -> Node: ...
|
|
161
|
+
def remove(self, item: Node) -> None: ...
|
|
162
|
+
def index(self, item: Node, start: int = 0, stop: int = sys.maxsize) -> int: ...
|
|
139
163
|
def previous_sibling(self) -> Node | None: ...
|
|
140
|
-
def
|
|
164
|
+
def is_not_default(self, key: str) -> bool: ...
|
|
165
|
+
def update_basic_atts(self, dict_: Mapping[str, Any] | Node) -> None: ...
|
|
166
|
+
def append_attr_list(self, attr: str, values: Iterable[Any]) -> None: ...
|
|
167
|
+
def coerce_append_attr_list(self, attr: str, value) -> None: ...
|
|
168
|
+
def replace_attr(self, attr: str, value: Any, force: bool = True) -> None: ...
|
|
169
|
+
def copy_attr_convert(self, attr: str, value: Any, replace: bool = True) -> None: ...
|
|
170
|
+
def copy_attr_coerce(self, attr: str, value: Any, replace: bool) -> None: ...
|
|
171
|
+
def copy_attr_concatenate(self, attr: str, value: Any, replace: bool) -> None: ...
|
|
172
|
+
def copy_attr_consistent(self, attr: str, value: Any, replace: bool) -> None: ...
|
|
173
|
+
def update_all_atts(
|
|
174
|
+
self,
|
|
175
|
+
dict_: Mapping[str, Any] | Node,
|
|
176
|
+
update_fun: Callable[[Element, str, Any, bool], object] = ...,
|
|
177
|
+
replace: bool = True,
|
|
178
|
+
and_source: bool = False,
|
|
179
|
+
) -> None: ...
|
|
180
|
+
def update_all_atts_consistantly(
|
|
181
|
+
self, dict_: Mapping[str, Any] | Node, replace: bool = True, and_source: bool = False
|
|
182
|
+
) -> None: ...
|
|
183
|
+
def update_all_atts_concatenating(
|
|
184
|
+
self, dict_: dict[str, Any] | Node, replace: bool = True, and_source: bool = False
|
|
185
|
+
) -> None: ...
|
|
186
|
+
def update_all_atts_coercion(
|
|
187
|
+
self, dict_: Mapping[str, Any] | Node, replace: bool = True, and_source: bool = False
|
|
188
|
+
) -> None: ...
|
|
189
|
+
def update_all_atts_convert(self, dict_: Mapping[str, Any] | Node, and_source: bool = False) -> None: ...
|
|
190
|
+
def clear(self) -> None: ...
|
|
191
|
+
def replace(self, old: Node, new: Node | Sequence[Node]) -> None: ...
|
|
192
|
+
def replace_self(self, new: Node | Sequence[Node]) -> None: ...
|
|
193
|
+
def first_child_matching_class(
|
|
194
|
+
self, childclass: type[Node] | tuple[type[Node], ...], start: int = 0, end: int = sys.maxsize
|
|
195
|
+
) -> int | None: ...
|
|
196
|
+
def first_child_not_matching_class(
|
|
197
|
+
self, childclass: type[Node] | tuple[type[Node], ...], start: int = 0, end: int = sys.maxsize
|
|
198
|
+
) -> int | None: ...
|
|
199
|
+
def pformat(self, indent: str = " ", level: int = 0) -> str: ...
|
|
200
|
+
def copy(self) -> Self: ...
|
|
201
|
+
def deepcopy(self) -> Self: ...
|
|
202
|
+
def set_class(self, name: str) -> None: ...
|
|
203
|
+
def note_referenced_by(self, name: str | None = None, id: str | None = None) -> None: ...
|
|
204
|
+
@classmethod
|
|
205
|
+
def is_not_list_attribute(cls, attr: str) -> bool: ...
|
|
206
|
+
@classmethod
|
|
207
|
+
def is_not_known_attribute(cls, attr: str) -> bool: ...
|
|
208
|
+
|
|
209
|
+
# '__iter__' is added as workaround, since mypy doesn't support classes that are iterable via '__getitem__'
|
|
210
|
+
# see https://github.com/python/typeshed/pull/10099#issuecomment-1528789395
|
|
211
|
+
def __iter__(self) -> Iterator[Node]: ...
|
|
141
212
|
|
|
142
213
|
class TextElement(Element):
|
|
143
|
-
# A few classes not subclassing TextElement have this, too
|
|
144
|
-
child_text_separator: ClassVar[str]
|
|
145
214
|
def __init__(self, rawsource: str = "", text: str = "", *children: Node, **attributes) -> None: ...
|
|
146
215
|
|
|
147
216
|
class FixedTextElement(TextElement): ...
|
|
@@ -299,22 +368,11 @@ class field_list(Sequential, Element): ...
|
|
|
299
368
|
class field(Part, Element): ...
|
|
300
369
|
class field_name(Part, TextElement): ...
|
|
301
370
|
class field_body(Part, Element): ...
|
|
302
|
-
|
|
303
|
-
# child_text_separator in some option* classes mirrors TextElement,
|
|
304
|
-
# but these classes do not subclass TextElement
|
|
305
|
-
class option(Part, Element):
|
|
306
|
-
child_text_separator: str
|
|
307
|
-
|
|
371
|
+
class option(Part, Element): ...
|
|
308
372
|
class option_argument(Part, TextElement): ...
|
|
309
|
-
|
|
310
|
-
class option_group(Part, Element):
|
|
311
|
-
child_text_separator: str # see above
|
|
312
|
-
|
|
373
|
+
class option_group(Part, Element): ...
|
|
313
374
|
class option_list(Sequential, Element): ...
|
|
314
|
-
|
|
315
|
-
class option_list_item(Part, Element):
|
|
316
|
-
child_text_separator: str # see above
|
|
317
|
-
|
|
375
|
+
class option_list_item(Part, Element): ...
|
|
318
376
|
class option_string(Part, TextElement): ...
|
|
319
377
|
class description(Part, Element): ...
|
|
320
378
|
class literal_block(General, FixedTextElement): ...
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import _typeshed
|
|
6
6
|
from collections.abc import Callable, Iterator, Sequence
|
|
7
7
|
from contextlib import AbstractContextManager
|
|
8
|
-
from typing import Protocol, final, overload
|
|
8
|
+
from typing import Literal, Protocol, final, overload
|
|
9
9
|
from typing_extensions import TypeAlias
|
|
10
10
|
|
|
11
11
|
import gdb.types
|
|
@@ -23,7 +23,14 @@ STDOUT: int
|
|
|
23
23
|
STDERR: int
|
|
24
24
|
STDLOG: int
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
@overload
|
|
27
|
+
def execute(command: str, from_tty: bool = False, to_string: Literal[False] = False) -> None: ...
|
|
28
|
+
@overload
|
|
29
|
+
def execute(command: str, *, to_string: Literal[True]) -> str: ...
|
|
30
|
+
@overload
|
|
31
|
+
def execute(command: str, from_tty: bool, to_string: Literal[True]) -> str: ...
|
|
32
|
+
@overload
|
|
33
|
+
def execute(command: str, from_tty: bool = False, to_string: bool = False) -> str | None: ...
|
|
27
34
|
def breakpoints() -> Sequence[Breakpoint]: ...
|
|
28
35
|
def rbreak(regex: str, minsyms: bool = ..., throttle: int = ..., symtabs: Iterator[Symtab] = ...) -> list[Breakpoint]: ...
|
|
29
36
|
def parameter(parameter: str, /) -> bool | int | str | None: ...
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version = "2.
|
|
1
|
+
version = "2.20.*"
|
|
2
2
|
# upstream_repository = closed-source
|