basedpyright 1.18.3 → 1.18.4
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 +3 -3
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +2 -0
- package/dist/typeshed-fallback/stdlib/_ast.pyi +140 -1667
- package/dist/typeshed-fallback/stdlib/_csv.pyi +14 -3
- package/dist/typeshed-fallback/stdlib/_curses.pyi +857 -65
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +29 -820
- package/dist/typeshed-fallback/stdlib/_socket.pyi +4 -12
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +387 -0
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +406 -0
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +2 -41
- package/dist/typeshed-fallback/stdlib/ast.pyi +1843 -172
- package/dist/typeshed-fallback/stdlib/builtins.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/cProfile.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/calendar.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/concurrent/futures/process.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/contextlib.pyi +6 -8
- package/dist/typeshed-fallback/stdlib/csv.pyi +4 -3
- package/dist/typeshed-fallback/stdlib/curses/__init__.pyi +7 -2
- package/dist/typeshed-fallback/stdlib/curses/panel.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/curses/textpad.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/decimal.pyi +840 -2
- package/dist/typeshed-fallback/stdlib/email/_policybase.pyi +27 -18
- package/dist/typeshed-fallback/stdlib/email/feedparser.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/email/generator.pyi +46 -9
- package/dist/typeshed-fallback/stdlib/email/message.pyi +8 -6
- package/dist/typeshed-fallback/stdlib/email/parser.pyi +6 -4
- package/dist/typeshed-fallback/stdlib/email/policy.pyi +28 -10
- package/dist/typeshed-fallback/stdlib/http/client.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/io.pyi +6 -22
- package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +27 -19
- package/dist/typeshed-fallback/stdlib/multiprocessing/context.pyi +5 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/multiprocessing/reduction.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/profile.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +1 -5
- package/dist/typeshed-fallback/stdlib/re.pyi +10 -1
- package/dist/typeshed-fallback/stdlib/socket.pyi +12 -4
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +739 -1
- package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +220 -884
- package/dist/typeshed-fallback/stdlib/sre_constants.pyi +1 -8
- package/dist/typeshed-fallback/stdlib/ssl.pyi +40 -128
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +111 -6
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +127 -21
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/typing.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/weakref.pyi +49 -14
- package/dist/typeshed-fallback/stdlib/xml/parsers/expat/__init__.pyi +6 -0
- package/dist/typeshed-fallback/stdlib/xmlrpc/client.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/xmlrpc/server.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +41 -44
- package/dist/typeshed-fallback/stdlib/zoneinfo/_common.pyi +13 -0
- package/dist/typeshed-fallback/stdlib/zoneinfo/_tzpath.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Flask-SocketIO/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +1 -0
- package/dist/typeshed-fallback/stubs/docutils/docutils/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/frontend.pyi +1 -2
- package/dist/typeshed-fallback/stubs/docutils/docutils/parsers/rst/directives/admonitions.pyi +15 -2
- package/dist/typeshed-fallback/stubs/docutils/docutils/readers/doctree.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docutils/docutils/writers/__init__.pyi +21 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +4 -4
- package/dist/typeshed-fallback/stubs/greenlet/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +5 -2
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +49 -5
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi +32 -6
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/caselessdict.pyi +2 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/parser.pyi +25 -1
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/parser_tools.pyi +7 -3
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/prop.pyi +112 -72
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/__init__.pyi +8 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/provider.pyi +29 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/pytz.pyi +22 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +30 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/zoneinfo.pyi +33 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/tools.pyi +2 -0
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/version.pyi +8 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/METADATA.toml +3 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/common.pyi +48 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jwa.pyi +35 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jwe.pyi +51 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jwk.pyi +115 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jws.pyi +52 -0
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jwt.pyi +78 -0
- package/dist/typeshed-fallback/stubs/m3u8/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/__init__.pyi +74 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/httpclient.pyi +19 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/mixins.pyi +25 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/model.pyi +406 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/parser.pyi +14 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/protocol.pyi +41 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/version_matching.pyi +5 -0
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/version_matching_rules.pyi +24 -0
- package/dist/typeshed-fallback/stubs/paramiko/paramiko/transport.pyi +2 -1
- package/dist/typeshed-fallback/stubs/protobuf/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +4 -3
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/internal/well_known_types.pyi +0 -1
- package/dist/typeshed-fallback/stubs/pytz/pytz/__init__.pyi +4 -4
- package/dist/typeshed-fallback/stubs/pytz/pytz/tzinfo.pyi +1 -1
- package/dist/typeshed-fallback/stubs/qrcode/METADATA.toml +3 -2
- package/dist/typeshed-fallback/stubs/redis/redis/client.pyi +18 -0
- package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/renderPDF.pyi +2 -2
- package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +9 -1
- package/dist/typeshed-fallback/stubs/vobject/vobject/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/vobject/vobject/base.pyi +11 -2
- package/dist/typeshed-fallback/stubs/vobject/vobject/behavior.pyi +1 -1
- package/dist/typeshed-fallback/stubs/vobject/vobject/change_tz.pyi +4 -0
- package/dist/typeshed-fallback/stubs/vobject/vobject/ics_diff.pyi +0 -3
- package/dist/typeshed-fallback/stubs/vobject/vobject/vcard.pyi +1 -1
- package/dist/typeshed-fallback/stubs/waitress/waitress/__init__.pyi +2 -2
- package/package.json +1 -1
- package/dist/typeshed-fallback/stubs/Pillow/METADATA.toml +0 -8
- package/dist/typeshed-fallback/stubs/Pillow/PIL/BdfFontFile.pyi +0 -11
- package/dist/typeshed-fallback/stubs/Pillow/PIL/BlpImagePlugin.pyi +0 -39
- package/dist/typeshed-fallback/stubs/Pillow/PIL/BmpImagePlugin.pyi +0 -25
- package/dist/typeshed-fallback/stubs/Pillow/PIL/BufrStubImagePlugin.pyi +0 -9
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ContainerIO.pyi +0 -14
- package/dist/typeshed-fallback/stubs/Pillow/PIL/CurImagePlugin.pyi +0 -6
- package/dist/typeshed-fallback/stubs/Pillow/PIL/DcxImagePlugin.pyi +0 -13
- package/dist/typeshed-fallback/stubs/Pillow/PIL/DdsImagePlugin.pyi +0 -314
- package/dist/typeshed-fallback/stubs/Pillow/PIL/EpsImagePlugin.pyi +0 -34
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ExifTags.pyi +0 -347
- package/dist/typeshed-fallback/stubs/Pillow/PIL/FitsImagePlugin.pyi +0 -7
- package/dist/typeshed-fallback/stubs/Pillow/PIL/FliImagePlugin.pyi +0 -9
- package/dist/typeshed-fallback/stubs/Pillow/PIL/FontFile.pyi +0 -16
- package/dist/typeshed-fallback/stubs/Pillow/PIL/FpxImagePlugin.pyi +0 -23
- package/dist/typeshed-fallback/stubs/Pillow/PIL/FtexImagePlugin.pyi +0 -15
- package/dist/typeshed-fallback/stubs/Pillow/PIL/GbrImagePlugin.pyi +0 -11
- package/dist/typeshed-fallback/stubs/Pillow/PIL/GdImageFile.pyi +0 -9
- package/dist/typeshed-fallback/stubs/Pillow/PIL/GifImagePlugin.pyi +0 -31
- package/dist/typeshed-fallback/stubs/Pillow/PIL/GimpGradientFile.pyi +0 -19
- package/dist/typeshed-fallback/stubs/Pillow/PIL/GimpPaletteFile.pyi +0 -7
- package/dist/typeshed-fallback/stubs/Pillow/PIL/GribStubImagePlugin.pyi +0 -9
- package/dist/typeshed-fallback/stubs/Pillow/PIL/Hdf5StubImagePlugin.pyi +0 -9
- package/dist/typeshed-fallback/stubs/Pillow/PIL/IcnsImagePlugin.pyi +0 -36
- package/dist/typeshed-fallback/stubs/Pillow/PIL/IcoImagePlugin.pyi +0 -26
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImImagePlugin.pyi +0 -34
- package/dist/typeshed-fallback/stubs/Pillow/PIL/Image.pyi +0 -342
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageChops.pyi +0 -23
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageCms.pyi +0 -84
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageColor.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageDraw.pyi +0 -155
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageDraw2.pyi +0 -37
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageEnhance.pyi +0 -25
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageFile.pyi +0 -89
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageFilter.pyi +0 -136
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageFont.pyi +0 -114
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageGrab.pyi +0 -36
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageMath.pyi +0 -49
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageMode.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageMorph.pyi +0 -26
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageOps.pyi +0 -53
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImagePalette.pyi +0 -26
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImagePath.pyi +0 -3
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageQt.pyi +0 -26
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageSequence.pyi +0 -14
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageShow.pyi +0 -58
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageStat.pyi +0 -14
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageTk.pyi +0 -51
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageTransform.pyi +0 -21
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImageWin.pyi +0 -38
- package/dist/typeshed-fallback/stubs/Pillow/PIL/ImtImagePlugin.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/IptcImagePlugin.pyi +0 -23
- package/dist/typeshed-fallback/stubs/Pillow/PIL/Jpeg2KImagePlugin.pyi +0 -23
- package/dist/typeshed-fallback/stubs/Pillow/PIL/JpegImagePlugin.pyi +0 -30
- package/dist/typeshed-fallback/stubs/Pillow/PIL/JpegPresets.pyi +0 -3
- package/dist/typeshed-fallback/stubs/Pillow/PIL/McIdasImagePlugin.pyi +0 -7
- package/dist/typeshed-fallback/stubs/Pillow/PIL/MicImagePlugin.pyi +0 -18
- package/dist/typeshed-fallback/stubs/Pillow/PIL/MpegImagePlugin.pyi +0 -18
- package/dist/typeshed-fallback/stubs/Pillow/PIL/MpoImagePlugin.pyi +0 -15
- package/dist/typeshed-fallback/stubs/Pillow/PIL/MspImagePlugin.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PSDraw.pyi +0 -19
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PaletteFile.pyi +0 -7
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PalmImagePlugin.pyi +0 -5
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PcdImagePlugin.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PcfFontFile.pyi +0 -25
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PcxImagePlugin.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PdfParser.pyi +0 -167
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PixarImagePlugin.pyi +0 -7
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PngImagePlugin.pyi +0 -115
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PpmImagePlugin.pyi +0 -17
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PsdImagePlugin.pyi +0 -17
- package/dist/typeshed-fallback/stubs/Pillow/PIL/PyAccess.pyi +0 -69
- package/dist/typeshed-fallback/stubs/Pillow/PIL/QoiImagePlugin.pyi +0 -11
- package/dist/typeshed-fallback/stubs/Pillow/PIL/SgiImagePlugin.pyi +0 -13
- package/dist/typeshed-fallback/stubs/Pillow/PIL/SpiderImagePlugin.pyi +0 -28
- package/dist/typeshed-fallback/stubs/Pillow/PIL/SunImagePlugin.pyi +0 -7
- package/dist/typeshed-fallback/stubs/Pillow/PIL/TarIO.pyi +0 -12
- package/dist/typeshed-fallback/stubs/Pillow/PIL/TgaImagePlugin.pyi +0 -12
- package/dist/typeshed-fallback/stubs/Pillow/PIL/TiffImagePlugin.pyi +0 -295
- package/dist/typeshed-fallback/stubs/Pillow/PIL/TiffTags.pyi +0 -46
- package/dist/typeshed-fallback/stubs/Pillow/PIL/WalImageFile.pyi +0 -14
- package/dist/typeshed-fallback/stubs/Pillow/PIL/WebPImagePlugin.pyi +0 -18
- package/dist/typeshed-fallback/stubs/Pillow/PIL/WmfImagePlugin.pyi +0 -19
- package/dist/typeshed-fallback/stubs/Pillow/PIL/XVThumbImagePlugin.pyi +0 -9
- package/dist/typeshed-fallback/stubs/Pillow/PIL/XbmImagePlugin.pyi +0 -10
- package/dist/typeshed-fallback/stubs/Pillow/PIL/XpmImagePlugin.pyi +0 -11
- package/dist/typeshed-fallback/stubs/Pillow/PIL/__init__.pyi +0 -3
- package/dist/typeshed-fallback/stubs/Pillow/PIL/_binary.pyi +0 -13
- package/dist/typeshed-fallback/stubs/Pillow/PIL/_imaging.pyi +0 -29
- package/dist/typeshed-fallback/stubs/Pillow/PIL/_tkinter_finder.pyi +0 -2
- package/dist/typeshed-fallback/stubs/Pillow/PIL/_version.pyi +0 -1
- package/dist/typeshed-fallback/stubs/Pillow/PIL/features.pyi +0 -23
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone_cache.pyi +0 -0
- /package/dist/typeshed-fallback/stubs/icalendar/icalendar/{windows_to_olson.pyi → timezone/windows_to_olson.pyi} +0 -0
- /package/dist/typeshed-fallback/stubs/{Pillow/PIL/PdfImagePlugin.pyi → jwcrypto/jwcrypto/__init__.pyi} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
from re import error as error
|
|
2
3
|
from typing import Any
|
|
3
4
|
from typing_extensions import Self
|
|
4
5
|
|
|
@@ -6,14 +7,6 @@ MAXGROUPS: int
|
|
|
6
7
|
|
|
7
8
|
MAGIC: int
|
|
8
9
|
|
|
9
|
-
class error(Exception):
|
|
10
|
-
msg: str
|
|
11
|
-
pattern: str | bytes | None
|
|
12
|
-
pos: int | None
|
|
13
|
-
lineno: int
|
|
14
|
-
colno: int
|
|
15
|
-
def __init__(self, msg: str, pattern: str | bytes | None = None, pos: int | None = None) -> None: ...
|
|
16
|
-
|
|
17
10
|
class _NamedIntConstant(int):
|
|
18
11
|
name: Any
|
|
19
12
|
def __new__(cls, value: int, name: str) -> Self: ...
|
|
@@ -1,18 +1,51 @@
|
|
|
1
1
|
import enum
|
|
2
2
|
import socket
|
|
3
3
|
import sys
|
|
4
|
+
from _ssl import (
|
|
5
|
+
_DEFAULT_CIPHERS as _DEFAULT_CIPHERS,
|
|
6
|
+
_OPENSSL_API_VERSION as _OPENSSL_API_VERSION,
|
|
7
|
+
HAS_ALPN as HAS_ALPN,
|
|
8
|
+
HAS_ECDH as HAS_ECDH,
|
|
9
|
+
HAS_NPN as HAS_NPN,
|
|
10
|
+
HAS_SNI as HAS_SNI,
|
|
11
|
+
OPENSSL_VERSION as OPENSSL_VERSION,
|
|
12
|
+
OPENSSL_VERSION_INFO as OPENSSL_VERSION_INFO,
|
|
13
|
+
OPENSSL_VERSION_NUMBER as OPENSSL_VERSION_NUMBER,
|
|
14
|
+
HAS_SSLv2 as HAS_SSLv2,
|
|
15
|
+
HAS_SSLv3 as HAS_SSLv3,
|
|
16
|
+
HAS_TLSv1 as HAS_TLSv1,
|
|
17
|
+
HAS_TLSv1_1 as HAS_TLSv1_1,
|
|
18
|
+
HAS_TLSv1_2 as HAS_TLSv1_2,
|
|
19
|
+
HAS_TLSv1_3 as HAS_TLSv1_3,
|
|
20
|
+
MemoryBIO as MemoryBIO,
|
|
21
|
+
RAND_add as RAND_add,
|
|
22
|
+
RAND_bytes as RAND_bytes,
|
|
23
|
+
RAND_status as RAND_status,
|
|
24
|
+
SSLSession as SSLSession,
|
|
25
|
+
_PasswordType as _PasswordType, # typeshed only, but re-export for other type stubs to use
|
|
26
|
+
_SSLContext,
|
|
27
|
+
)
|
|
4
28
|
from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer
|
|
5
29
|
from collections.abc import Callable, Iterable
|
|
6
|
-
from typing import Any, Literal, NamedTuple, TypedDict,
|
|
30
|
+
from typing import Any, Literal, NamedTuple, TypedDict, overload
|
|
7
31
|
from typing_extensions import Never, Self, TypeAlias
|
|
8
32
|
|
|
33
|
+
if sys.version_info >= (3, 13):
|
|
34
|
+
from _ssl import HAS_PSK as HAS_PSK
|
|
35
|
+
|
|
36
|
+
if sys.version_info < (3, 12):
|
|
37
|
+
from _ssl import RAND_pseudo_bytes as RAND_pseudo_bytes
|
|
38
|
+
|
|
39
|
+
if sys.version_info < (3, 10):
|
|
40
|
+
from _ssl import RAND_egd as RAND_egd
|
|
41
|
+
|
|
42
|
+
if sys.platform == "win32":
|
|
43
|
+
from _ssl import enum_certificates as enum_certificates, enum_crls as enum_crls
|
|
44
|
+
|
|
9
45
|
_PCTRTT: TypeAlias = tuple[tuple[str, str], ...]
|
|
10
46
|
_PCTRTTT: TypeAlias = tuple[_PCTRTT, ...]
|
|
11
47
|
_PeerCertRetDictType: TypeAlias = dict[str, str | _PCTRTTT | _PCTRTT]
|
|
12
48
|
_PeerCertRetType: TypeAlias = _PeerCertRetDictType | bytes | None
|
|
13
|
-
_EnumRetType: TypeAlias = list[tuple[bytes, str, set[str] | bool]]
|
|
14
|
-
_PasswordType: TypeAlias = Callable[[], str | bytes | bytearray] | str | bytes | bytearray
|
|
15
|
-
|
|
16
49
|
_SrvnmeCbType: TypeAlias = Callable[[SSLSocket | SSLObject, str | None, SSLSocket], int | None]
|
|
17
50
|
|
|
18
51
|
socket_error = OSError
|
|
@@ -98,38 +131,6 @@ else:
|
|
|
98
131
|
|
|
99
132
|
_create_default_https_context: Callable[..., SSLContext]
|
|
100
133
|
|
|
101
|
-
def RAND_bytes(n: int, /) -> bytes:
|
|
102
|
-
"""Generate n cryptographically strong pseudo-random bytes."""
|
|
103
|
-
...
|
|
104
|
-
|
|
105
|
-
if sys.version_info < (3, 12):
|
|
106
|
-
def RAND_pseudo_bytes(n: int, /) -> tuple[bytes, bool]:
|
|
107
|
-
"""
|
|
108
|
-
Generate n pseudo-random bytes.
|
|
109
|
-
|
|
110
|
-
Return a pair (bytes, is_cryptographic). is_cryptographic is True
|
|
111
|
-
if the bytes generated are cryptographically strong.
|
|
112
|
-
"""
|
|
113
|
-
...
|
|
114
|
-
|
|
115
|
-
def RAND_status() -> bool:
|
|
116
|
-
"""
|
|
117
|
-
Returns True if the OpenSSL PRNG has been seeded with enough data and False if not.
|
|
118
|
-
|
|
119
|
-
It is necessary to seed the PRNG with RAND_add() on some platforms before
|
|
120
|
-
using the ssl() function.
|
|
121
|
-
"""
|
|
122
|
-
...
|
|
123
|
-
def RAND_egd(path: str) -> None: ...
|
|
124
|
-
def RAND_add(string: str | ReadableBuffer, entropy: float, /) -> None:
|
|
125
|
-
"""
|
|
126
|
-
Mix string into the OpenSSL PRNG state.
|
|
127
|
-
|
|
128
|
-
entropy (a float) is a lower bound on the entropy contained in
|
|
129
|
-
string. See RFC 4086.
|
|
130
|
-
"""
|
|
131
|
-
...
|
|
132
|
-
|
|
133
134
|
if sys.version_info < (3, 12):
|
|
134
135
|
def match_hostname(cert: _PeerCertRetDictType, hostname: str) -> None: ...
|
|
135
136
|
|
|
@@ -156,10 +157,6 @@ class DefaultVerifyPaths(NamedTuple):
|
|
|
156
157
|
|
|
157
158
|
def get_default_verify_paths() -> DefaultVerifyPaths: ...
|
|
158
159
|
|
|
159
|
-
if sys.platform == "win32":
|
|
160
|
-
def enum_certificates(store_name: str) -> _EnumRetType: ...
|
|
161
|
-
def enum_crls(store_name: str) -> _EnumRetType: ...
|
|
162
|
-
|
|
163
160
|
class VerifyMode(enum.IntEnum):
|
|
164
161
|
CERT_NONE = 0
|
|
165
162
|
CERT_OPTIONAL = 1
|
|
@@ -252,21 +249,8 @@ if sys.version_info >= (3, 11) or sys.platform == "linux":
|
|
|
252
249
|
OP_IGNORE_UNEXPECTED_EOF: Options
|
|
253
250
|
|
|
254
251
|
HAS_NEVER_CHECK_COMMON_NAME: bool
|
|
255
|
-
HAS_SSLv2: bool
|
|
256
|
-
HAS_SSLv3: bool
|
|
257
|
-
HAS_TLSv1: bool
|
|
258
|
-
HAS_TLSv1_1: bool
|
|
259
|
-
HAS_TLSv1_2: bool
|
|
260
|
-
HAS_TLSv1_3: bool
|
|
261
|
-
HAS_ALPN: bool
|
|
262
|
-
HAS_ECDH: bool
|
|
263
|
-
HAS_SNI: bool
|
|
264
|
-
HAS_NPN: bool
|
|
265
|
-
CHANNEL_BINDING_TYPES: list[str]
|
|
266
252
|
|
|
267
|
-
|
|
268
|
-
OPENSSL_VERSION_INFO: tuple[int, int, int, int, int]
|
|
269
|
-
OPENSSL_VERSION_NUMBER: int
|
|
253
|
+
CHANNEL_BINDING_TYPES: list[str]
|
|
270
254
|
|
|
271
255
|
class AlertDescription(enum.IntEnum):
|
|
272
256
|
ALERT_DESCRIPTION_ACCESS_DENIED = 49
|
|
@@ -408,17 +392,15 @@ class TLSVersion(enum.IntEnum):
|
|
|
408
392
|
TLSv1_2 = 771
|
|
409
393
|
TLSv1_3 = 772
|
|
410
394
|
|
|
411
|
-
class SSLContext:
|
|
412
|
-
check_hostname: bool
|
|
395
|
+
class SSLContext(_SSLContext):
|
|
413
396
|
options: Options
|
|
414
397
|
verify_flags: VerifyFlags
|
|
415
398
|
verify_mode: VerifyMode
|
|
416
399
|
@property
|
|
417
|
-
def protocol(self) -> _SSLMethod: ...
|
|
400
|
+
def protocol(self) -> _SSLMethod: ... # type: ignore[override]
|
|
418
401
|
hostname_checks_common_name: bool
|
|
419
402
|
maximum_version: TLSVersion
|
|
420
403
|
minimum_version: TLSVersion
|
|
421
|
-
sni_callback: Callable[[SSLObject, str, SSLContext], None | int] | None
|
|
422
404
|
# The following two attributes have class-level defaults.
|
|
423
405
|
# However, the docs explicitly state that it's OK to override these attributes on instances,
|
|
424
406
|
# so making these ClassVars wouldn't be appropriate
|
|
@@ -435,20 +417,6 @@ class SSLContext:
|
|
|
435
417
|
else:
|
|
436
418
|
def __new__(cls, protocol: int = ..., *args: Any, **kwargs: Any) -> Self: ...
|
|
437
419
|
|
|
438
|
-
def cert_store_stats(self) -> dict[str, int]:
|
|
439
|
-
"""
|
|
440
|
-
Returns quantities of loaded X.509 certificates.
|
|
441
|
-
|
|
442
|
-
X.509 certificates with a CA extension and certificate revocation lists
|
|
443
|
-
inside the context's cert store.
|
|
444
|
-
|
|
445
|
-
NOTE: Certificates in a capath directory aren't loaded unless they have
|
|
446
|
-
been used at least once.
|
|
447
|
-
"""
|
|
448
|
-
...
|
|
449
|
-
def load_cert_chain(
|
|
450
|
-
self, certfile: StrOrBytesPath, keyfile: StrOrBytesPath | None = None, password: _PasswordType | None = None
|
|
451
|
-
) -> None: ...
|
|
452
420
|
def load_default_certs(self, purpose: Purpose = ...) -> None: ...
|
|
453
421
|
def load_verify_locations(
|
|
454
422
|
self,
|
|
@@ -517,7 +485,6 @@ class SSLContext:
|
|
|
517
485
|
server_hostname: str | bytes | None = None,
|
|
518
486
|
session: SSLSession | None = None,
|
|
519
487
|
) -> SSLObject: ...
|
|
520
|
-
def session_stats(self) -> dict[str, int]: ...
|
|
521
488
|
|
|
522
489
|
class SSLObject:
|
|
523
490
|
context: SSLContext
|
|
@@ -561,61 +528,6 @@ class SSLObject:
|
|
|
561
528
|
def get_verified_chain(self) -> list[bytes]: ...
|
|
562
529
|
def get_unverified_chain(self) -> list[bytes]: ...
|
|
563
530
|
|
|
564
|
-
@final
|
|
565
|
-
class MemoryBIO:
|
|
566
|
-
pending: int
|
|
567
|
-
eof: bool
|
|
568
|
-
def read(self, size: int = -1, /) -> bytes:
|
|
569
|
-
"""
|
|
570
|
-
Read up to size bytes from the memory BIO.
|
|
571
|
-
|
|
572
|
-
If size is not specified, read the entire buffer.
|
|
573
|
-
If the return value is an empty bytes instance, this means either
|
|
574
|
-
EOF or that no data is available. Use the "eof" property to
|
|
575
|
-
distinguish between the two.
|
|
576
|
-
"""
|
|
577
|
-
...
|
|
578
|
-
def write(self, b: ReadableBuffer, /) -> int:
|
|
579
|
-
"""
|
|
580
|
-
Writes the bytes b into the memory BIO.
|
|
581
|
-
|
|
582
|
-
Returns the number of bytes written.
|
|
583
|
-
"""
|
|
584
|
-
...
|
|
585
|
-
def write_eof(self) -> None:
|
|
586
|
-
"""
|
|
587
|
-
Write an EOF marker to the memory BIO.
|
|
588
|
-
|
|
589
|
-
When all data has been read, the "eof" property will be True.
|
|
590
|
-
"""
|
|
591
|
-
...
|
|
592
|
-
|
|
593
|
-
@final
|
|
594
|
-
class SSLSession:
|
|
595
|
-
@property
|
|
596
|
-
def has_ticket(self) -> bool:
|
|
597
|
-
"""Does the session contain a ticket?"""
|
|
598
|
-
...
|
|
599
|
-
@property
|
|
600
|
-
def id(self) -> bytes:
|
|
601
|
-
"""Session id"""
|
|
602
|
-
...
|
|
603
|
-
@property
|
|
604
|
-
def ticket_lifetime_hint(self) -> int:
|
|
605
|
-
"""Ticket life time hint."""
|
|
606
|
-
...
|
|
607
|
-
@property
|
|
608
|
-
def time(self) -> int:
|
|
609
|
-
"""Session creation time (seconds since epoch)."""
|
|
610
|
-
...
|
|
611
|
-
@property
|
|
612
|
-
def timeout(self) -> int:
|
|
613
|
-
"""Session timeout (delta in seconds)."""
|
|
614
|
-
...
|
|
615
|
-
def __eq__(self, value: object, /) -> bool:
|
|
616
|
-
"""Return self==value."""
|
|
617
|
-
...
|
|
618
|
-
|
|
619
531
|
class SSLErrorNumber(enum.IntEnum):
|
|
620
532
|
SSL_ERROR_EOF = 8
|
|
621
533
|
SSL_ERROR_INVALID_ERROR_CODE = 10
|
|
@@ -103,12 +103,10 @@ PAX_NAME_FIELDS: set[str]
|
|
|
103
103
|
|
|
104
104
|
ENCODING: str
|
|
105
105
|
|
|
106
|
-
_FileCreationModes: TypeAlias = Literal["a", "w", "x"]
|
|
107
|
-
|
|
108
106
|
@overload
|
|
109
107
|
def open(
|
|
110
108
|
name: StrOrBytesPath | None = None,
|
|
111
|
-
mode:
|
|
109
|
+
mode: Literal["r", "r:*", "r:", "r:gz", "r:bz2", "r:xz"] = "r",
|
|
112
110
|
fileobj: IO[bytes] | None = None,
|
|
113
111
|
bufsize: int = 10240,
|
|
114
112
|
*,
|
|
@@ -121,16 +119,124 @@ def open(
|
|
|
121
119
|
pax_headers: Mapping[str, str] | None = ...,
|
|
122
120
|
debug: int | None = ...,
|
|
123
121
|
errorlevel: int | None = ...,
|
|
124
|
-
|
|
122
|
+
) -> TarFile: ...
|
|
123
|
+
@overload
|
|
124
|
+
def open(
|
|
125
|
+
name: StrOrBytesPath | None,
|
|
126
|
+
mode: Literal["x", "x:", "a", "a:", "w", "w:"],
|
|
127
|
+
fileobj: _Fileobj | None = None,
|
|
128
|
+
bufsize: int = 10240,
|
|
129
|
+
*,
|
|
130
|
+
format: int | None = ...,
|
|
131
|
+
tarinfo: type[TarInfo] | None = ...,
|
|
132
|
+
dereference: bool | None = ...,
|
|
133
|
+
ignore_zeros: bool | None = ...,
|
|
134
|
+
encoding: str | None = ...,
|
|
135
|
+
errors: str = ...,
|
|
136
|
+
pax_headers: Mapping[str, str] | None = ...,
|
|
137
|
+
debug: int | None = ...,
|
|
138
|
+
errorlevel: int | None = ...,
|
|
139
|
+
) -> TarFile: ...
|
|
140
|
+
@overload
|
|
141
|
+
def open(
|
|
142
|
+
name: StrOrBytesPath | None = None,
|
|
143
|
+
*,
|
|
144
|
+
mode: Literal["x", "x:", "a", "a:", "w", "w:"],
|
|
145
|
+
fileobj: _Fileobj | None = None,
|
|
146
|
+
bufsize: int = 10240,
|
|
147
|
+
format: int | None = ...,
|
|
148
|
+
tarinfo: type[TarInfo] | None = ...,
|
|
149
|
+
dereference: bool | None = ...,
|
|
150
|
+
ignore_zeros: bool | None = ...,
|
|
151
|
+
encoding: str | None = ...,
|
|
152
|
+
errors: str = ...,
|
|
153
|
+
pax_headers: Mapping[str, str] | None = ...,
|
|
154
|
+
debug: int | None = ...,
|
|
155
|
+
errorlevel: int | None = ...,
|
|
156
|
+
) -> TarFile: ...
|
|
157
|
+
@overload
|
|
158
|
+
def open(
|
|
159
|
+
name: StrOrBytesPath | None,
|
|
160
|
+
mode: Literal["x:gz", "x:bz2", "w:gz", "w:bz2"],
|
|
161
|
+
fileobj: _Fileobj | None = None,
|
|
162
|
+
bufsize: int = 10240,
|
|
163
|
+
*,
|
|
164
|
+
format: int | None = ...,
|
|
165
|
+
tarinfo: type[TarInfo] | None = ...,
|
|
166
|
+
dereference: bool | None = ...,
|
|
167
|
+
ignore_zeros: bool | None = ...,
|
|
168
|
+
encoding: str | None = ...,
|
|
169
|
+
errors: str = ...,
|
|
170
|
+
pax_headers: Mapping[str, str] | None = ...,
|
|
171
|
+
debug: int | None = ...,
|
|
172
|
+
errorlevel: int | None = ...,
|
|
173
|
+
compresslevel: int = 9,
|
|
174
|
+
) -> TarFile: ...
|
|
175
|
+
@overload
|
|
176
|
+
def open(
|
|
177
|
+
name: StrOrBytesPath | None = None,
|
|
178
|
+
*,
|
|
179
|
+
mode: Literal["x:gz", "x:bz2", "w:gz", "w:bz2"],
|
|
180
|
+
fileobj: _Fileobj | None = None,
|
|
181
|
+
bufsize: int = 10240,
|
|
182
|
+
format: int | None = ...,
|
|
183
|
+
tarinfo: type[TarInfo] | None = ...,
|
|
184
|
+
dereference: bool | None = ...,
|
|
185
|
+
ignore_zeros: bool | None = ...,
|
|
186
|
+
encoding: str | None = ...,
|
|
187
|
+
errors: str = ...,
|
|
188
|
+
pax_headers: Mapping[str, str] | None = ...,
|
|
189
|
+
debug: int | None = ...,
|
|
190
|
+
errorlevel: int | None = ...,
|
|
191
|
+
compresslevel: int = 9,
|
|
192
|
+
) -> TarFile: ...
|
|
193
|
+
@overload
|
|
194
|
+
def open(
|
|
195
|
+
name: StrOrBytesPath | None,
|
|
196
|
+
mode: Literal["x:xz", "w:xz"],
|
|
197
|
+
fileobj: _Fileobj | None = None,
|
|
198
|
+
bufsize: int = 10240,
|
|
199
|
+
*,
|
|
200
|
+
format: int | None = ...,
|
|
201
|
+
tarinfo: type[TarInfo] | None = ...,
|
|
202
|
+
dereference: bool | None = ...,
|
|
203
|
+
ignore_zeros: bool | None = ...,
|
|
204
|
+
encoding: str | None = ...,
|
|
205
|
+
errors: str = ...,
|
|
206
|
+
pax_headers: Mapping[str, str] | None = ...,
|
|
207
|
+
debug: int | None = ...,
|
|
208
|
+
errorlevel: int | None = ...,
|
|
125
209
|
preset: Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | None = ...,
|
|
126
210
|
) -> TarFile: ...
|
|
127
211
|
@overload
|
|
128
212
|
def open(
|
|
129
213
|
name: StrOrBytesPath | None = None,
|
|
130
|
-
|
|
214
|
+
*,
|
|
215
|
+
mode: Literal["x:xz", "w:xz"],
|
|
131
216
|
fileobj: _Fileobj | None = None,
|
|
132
217
|
bufsize: int = 10240,
|
|
218
|
+
format: int | None = ...,
|
|
219
|
+
tarinfo: type[TarInfo] | None = ...,
|
|
220
|
+
dereference: bool | None = ...,
|
|
221
|
+
ignore_zeros: bool | None = ...,
|
|
222
|
+
encoding: str | None = ...,
|
|
223
|
+
errors: str = ...,
|
|
224
|
+
pax_headers: Mapping[str, str] | None = ...,
|
|
225
|
+
debug: int | None = ...,
|
|
226
|
+
errorlevel: int | None = ...,
|
|
227
|
+
preset: Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | None = ...,
|
|
228
|
+
) -> TarFile: ...
|
|
229
|
+
|
|
230
|
+
# TODO: Temporary fallback for modes containing pipe characters. These don't
|
|
231
|
+
# work with mypy 1.10, but this should be fixed with mypy 1.11.
|
|
232
|
+
# https://github.com/python/typeshed/issues/12182
|
|
233
|
+
@overload
|
|
234
|
+
def open(
|
|
235
|
+
name: StrOrBytesPath | None = None,
|
|
133
236
|
*,
|
|
237
|
+
mode: str,
|
|
238
|
+
fileobj: IO[bytes] | None = None,
|
|
239
|
+
bufsize: int = 10240,
|
|
134
240
|
format: int | None = ...,
|
|
135
241
|
tarinfo: type[TarInfo] | None = ...,
|
|
136
242
|
dereference: bool | None = ...,
|
|
@@ -140,7 +246,6 @@ def open(
|
|
|
140
246
|
pax_headers: Mapping[str, str] | None = ...,
|
|
141
247
|
debug: int | None = ...,
|
|
142
248
|
errorlevel: int | None = ...,
|
|
143
|
-
compresslevel: int | None = ...,
|
|
144
249
|
preset: int | None = ...,
|
|
145
250
|
) -> TarFile: ...
|
|
146
251
|
|
|
@@ -3027,27 +3027,133 @@ class Text(Widget, XView, YView):
|
|
|
3027
3027
|
config = configure
|
|
3028
3028
|
def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore[override]
|
|
3029
3029
|
def compare(self, index1: _TextIndex, op: Literal["<", "<=", "==", ">=", ">", "!="], index2: _TextIndex) -> bool: ...
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3030
|
+
if sys.version_info >= (3, 13):
|
|
3031
|
+
@overload
|
|
3032
|
+
def count(self, index1: _TextIndex, index2: _TextIndex, *, return_ints: Literal[True]) -> int: ...
|
|
3033
|
+
@overload
|
|
3034
|
+
def count(
|
|
3035
|
+
self, index1: _TextIndex, index2: _TextIndex, arg: _WhatToCount | Literal["update"], /, *, return_ints: Literal[True]
|
|
3036
|
+
) -> int: ...
|
|
3037
|
+
@overload
|
|
3038
|
+
def count(
|
|
3039
|
+
self,
|
|
3040
|
+
index1: _TextIndex,
|
|
3041
|
+
index2: _TextIndex,
|
|
3042
|
+
arg1: Literal["update"],
|
|
3043
|
+
arg2: _WhatToCount,
|
|
3044
|
+
/,
|
|
3045
|
+
*,
|
|
3046
|
+
return_ints: Literal[True],
|
|
3047
|
+
) -> int: ...
|
|
3048
|
+
@overload
|
|
3049
|
+
def count(
|
|
3050
|
+
self,
|
|
3051
|
+
index1: _TextIndex,
|
|
3052
|
+
index2: _TextIndex,
|
|
3053
|
+
arg1: _WhatToCount,
|
|
3054
|
+
arg2: Literal["update"],
|
|
3055
|
+
/,
|
|
3056
|
+
*,
|
|
3057
|
+
return_ints: Literal[True],
|
|
3058
|
+
) -> int: ...
|
|
3059
|
+
@overload
|
|
3060
|
+
def count(
|
|
3061
|
+
self, index1: _TextIndex, index2: _TextIndex, arg1: _WhatToCount, arg2: _WhatToCount, /, *, return_ints: Literal[True]
|
|
3062
|
+
) -> tuple[int, int]: ...
|
|
3063
|
+
@overload
|
|
3064
|
+
def count(
|
|
3065
|
+
self,
|
|
3066
|
+
index1: _TextIndex,
|
|
3067
|
+
index2: _TextIndex,
|
|
3068
|
+
arg1: _WhatToCount | Literal["update"],
|
|
3069
|
+
arg2: _WhatToCount | Literal["update"],
|
|
3070
|
+
arg3: _WhatToCount | Literal["update"],
|
|
3071
|
+
/,
|
|
3072
|
+
*args: _WhatToCount | Literal["update"],
|
|
3073
|
+
return_ints: Literal[True],
|
|
3074
|
+
) -> tuple[int, ...]: ...
|
|
3075
|
+
@overload
|
|
3076
|
+
def count(self, index1: _TextIndex, index2: _TextIndex, *, return_ints: Literal[False] = False) -> tuple[int] | None: ...
|
|
3077
|
+
@overload
|
|
3078
|
+
def count(
|
|
3079
|
+
self,
|
|
3080
|
+
index1: _TextIndex,
|
|
3081
|
+
index2: _TextIndex,
|
|
3082
|
+
arg: _WhatToCount | Literal["update"],
|
|
3083
|
+
/,
|
|
3084
|
+
*,
|
|
3085
|
+
return_ints: Literal[False] = False,
|
|
3086
|
+
) -> tuple[int] | None: ...
|
|
3087
|
+
@overload
|
|
3088
|
+
def count(
|
|
3089
|
+
self,
|
|
3090
|
+
index1: _TextIndex,
|
|
3091
|
+
index2: _TextIndex,
|
|
3092
|
+
arg1: Literal["update"],
|
|
3093
|
+
arg2: _WhatToCount,
|
|
3094
|
+
/,
|
|
3095
|
+
*,
|
|
3096
|
+
return_ints: Literal[False] = False,
|
|
3097
|
+
) -> int | None: ...
|
|
3098
|
+
@overload
|
|
3099
|
+
def count(
|
|
3100
|
+
self,
|
|
3101
|
+
index1: _TextIndex,
|
|
3102
|
+
index2: _TextIndex,
|
|
3103
|
+
arg1: _WhatToCount,
|
|
3104
|
+
arg2: Literal["update"],
|
|
3105
|
+
/,
|
|
3106
|
+
*,
|
|
3107
|
+
return_ints: Literal[False] = False,
|
|
3108
|
+
) -> int | None: ...
|
|
3109
|
+
@overload
|
|
3110
|
+
def count(
|
|
3111
|
+
self,
|
|
3112
|
+
index1: _TextIndex,
|
|
3113
|
+
index2: _TextIndex,
|
|
3114
|
+
arg1: _WhatToCount,
|
|
3115
|
+
arg2: _WhatToCount,
|
|
3116
|
+
/,
|
|
3117
|
+
*,
|
|
3118
|
+
return_ints: Literal[False] = False,
|
|
3119
|
+
) -> tuple[int, int]: ...
|
|
3120
|
+
@overload
|
|
3121
|
+
def count(
|
|
3122
|
+
self,
|
|
3123
|
+
index1: _TextIndex,
|
|
3124
|
+
index2: _TextIndex,
|
|
3125
|
+
arg1: _WhatToCount | Literal["update"],
|
|
3126
|
+
arg2: _WhatToCount | Literal["update"],
|
|
3127
|
+
arg3: _WhatToCount | Literal["update"],
|
|
3128
|
+
/,
|
|
3129
|
+
*args: _WhatToCount | Literal["update"],
|
|
3130
|
+
return_ints: Literal[False] = False,
|
|
3131
|
+
) -> tuple[int, ...]: ...
|
|
3132
|
+
else:
|
|
3133
|
+
@overload
|
|
3134
|
+
def count(self, index1: _TextIndex, index2: _TextIndex) -> tuple[int] | None: ...
|
|
3135
|
+
@overload
|
|
3136
|
+
def count(
|
|
3137
|
+
self, index1: _TextIndex, index2: _TextIndex, arg: _WhatToCount | Literal["update"], /
|
|
3138
|
+
) -> tuple[int] | None: ...
|
|
3139
|
+
@overload
|
|
3140
|
+
def count(self, index1: _TextIndex, index2: _TextIndex, arg1: Literal["update"], arg2: _WhatToCount, /) -> int | None: ...
|
|
3141
|
+
@overload
|
|
3142
|
+
def count(self, index1: _TextIndex, index2: _TextIndex, arg1: _WhatToCount, arg2: Literal["update"], /) -> int | None: ...
|
|
3143
|
+
@overload
|
|
3144
|
+
def count(self, index1: _TextIndex, index2: _TextIndex, arg1: _WhatToCount, arg2: _WhatToCount, /) -> tuple[int, int]: ...
|
|
3145
|
+
@overload
|
|
3146
|
+
def count(
|
|
3147
|
+
self,
|
|
3148
|
+
index1: _TextIndex,
|
|
3149
|
+
index2: _TextIndex,
|
|
3150
|
+
arg1: _WhatToCount | Literal["update"],
|
|
3151
|
+
arg2: _WhatToCount | Literal["update"],
|
|
3152
|
+
arg3: _WhatToCount | Literal["update"],
|
|
3153
|
+
/,
|
|
3154
|
+
*args: _WhatToCount | Literal["update"],
|
|
3155
|
+
) -> tuple[int, ...]: ...
|
|
3156
|
+
|
|
3051
3157
|
@overload
|
|
3052
3158
|
def debug(self, boolean: None = None) -> bool: ...
|
|
3053
3159
|
@overload
|
|
@@ -133,7 +133,7 @@ class Untokenizer:
|
|
|
133
133
|
def untokenize(iterable: Iterable[_Token]) -> Any: ...
|
|
134
134
|
def detect_encoding(readline: Callable[[], bytes | bytearray]) -> tuple[str, Sequence[bytes]]: ...
|
|
135
135
|
def tokenize(readline: Callable[[], bytes | bytearray]) -> Generator[TokenInfo, None, None]: ...
|
|
136
|
-
def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo, None, None]: ...
|
|
136
|
+
def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo, None, None]: ...
|
|
137
137
|
def open(filename: FileDescriptorOrPath) -> TextIO: ...
|
|
138
138
|
def group(*choices: str) -> str: ... # undocumented
|
|
139
139
|
def any(*choices: str) -> str: ... # undocumented
|
|
@@ -920,13 +920,13 @@ if sys.version_info >= (3, 9):
|
|
|
920
920
|
def get_type_hints(
|
|
921
921
|
obj: _get_type_hints_obj_allowed_types,
|
|
922
922
|
globalns: dict[str, Any] | None = None,
|
|
923
|
-
localns:
|
|
923
|
+
localns: Mapping[str, Any] | None = None,
|
|
924
924
|
include_extras: bool = False,
|
|
925
925
|
) -> dict[str, Any]: ...
|
|
926
926
|
|
|
927
927
|
else:
|
|
928
928
|
def get_type_hints(
|
|
929
|
-
obj: _get_type_hints_obj_allowed_types, globalns: dict[str, Any] | None = None, localns:
|
|
929
|
+
obj: _get_type_hints_obj_allowed_types, globalns: dict[str, Any] | None = None, localns: Mapping[str, Any] | None = None
|
|
930
930
|
) -> dict[str, Any]: ...
|
|
931
931
|
|
|
932
932
|
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
|
@@ -1066,13 +1066,13 @@ class ForwardRef:
|
|
|
1066
1066
|
"that references a PEP 695 type parameter. It will be disallowed in Python 3.15."
|
|
1067
1067
|
)
|
|
1068
1068
|
def _evaluate(
|
|
1069
|
-
self, globalns: dict[str, Any] | None, localns:
|
|
1069
|
+
self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None, *, recursive_guard: frozenset[str]
|
|
1070
1070
|
) -> Any | None: ...
|
|
1071
1071
|
@overload
|
|
1072
1072
|
def _evaluate(
|
|
1073
1073
|
self,
|
|
1074
1074
|
globalns: dict[str, Any] | None,
|
|
1075
|
-
localns:
|
|
1075
|
+
localns: Mapping[str, Any] | None,
|
|
1076
1076
|
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...],
|
|
1077
1077
|
*,
|
|
1078
1078
|
recursive_guard: frozenset[str],
|
|
@@ -1081,17 +1081,17 @@ class ForwardRef:
|
|
|
1081
1081
|
def _evaluate(
|
|
1082
1082
|
self,
|
|
1083
1083
|
globalns: dict[str, Any] | None,
|
|
1084
|
-
localns:
|
|
1084
|
+
localns: Mapping[str, Any] | None,
|
|
1085
1085
|
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
|
|
1086
1086
|
*,
|
|
1087
1087
|
recursive_guard: frozenset[str],
|
|
1088
1088
|
) -> Any | None: ...
|
|
1089
1089
|
elif sys.version_info >= (3, 9):
|
|
1090
1090
|
def _evaluate(
|
|
1091
|
-
self, globalns: dict[str, Any] | None, localns:
|
|
1091
|
+
self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None, recursive_guard: frozenset[str]
|
|
1092
1092
|
) -> Any | None: ...
|
|
1093
1093
|
else:
|
|
1094
|
-
def _evaluate(self, globalns: dict[str, Any] | None, localns:
|
|
1094
|
+
def _evaluate(self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None) -> Any | None: ...
|
|
1095
1095
|
|
|
1096
1096
|
def __eq__(self, other: object) -> bool: ...
|
|
1097
1097
|
def __hash__(self) -> int: ...
|
|
@@ -269,7 +269,7 @@ OrderedDict = _Alias()
|
|
|
269
269
|
def get_type_hints(
|
|
270
270
|
obj: Callable[..., Any],
|
|
271
271
|
globalns: dict[str, Any] | None = None,
|
|
272
|
-
localns:
|
|
272
|
+
localns: Mapping[str, Any] | None = None,
|
|
273
273
|
include_extras: bool = False,
|
|
274
274
|
) -> dict[str, Any]: ...
|
|
275
275
|
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
|
@@ -365,7 +365,7 @@ class _patcher:
|
|
|
365
365
|
|
|
366
366
|
patch: _patcher
|
|
367
367
|
|
|
368
|
-
class MagicMixin:
|
|
368
|
+
class MagicMixin(Base):
|
|
369
369
|
def __init__(self, *args: Any, **kw: Any) -> None: ...
|
|
370
370
|
|
|
371
371
|
class NonCallableMagicMock(MagicMixin, NonCallableMock): ...
|
|
@@ -395,7 +395,7 @@ class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock):
|
|
|
395
395
|
# But, `NonCallableMock` super-class has the better version.
|
|
396
396
|
def reset_mock(self, visited: Any = None, *, return_value: bool = False, side_effect: bool = False) -> None: ...
|
|
397
397
|
|
|
398
|
-
class MagicProxy:
|
|
398
|
+
class MagicProxy(Base):
|
|
399
399
|
name: str
|
|
400
400
|
parent: Any
|
|
401
401
|
def __init__(self, name: str, parent: Any) -> None: ...
|