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,137 +1,166 @@
|
|
|
1
1
|
import datetime
|
|
2
|
-
from _typeshed import Incomplete
|
|
3
|
-
from
|
|
2
|
+
from _typeshed import Incomplete, Unused
|
|
3
|
+
from collections.abc import Iterator
|
|
4
|
+
from enum import Enum
|
|
4
5
|
from re import Pattern
|
|
5
|
-
from typing import Any, ClassVar, Final
|
|
6
|
-
from typing_extensions import TypeAlias
|
|
6
|
+
from typing import Any, ClassVar, Final, TypeVar, overload
|
|
7
|
+
from typing_extensions import Self, TypeAlias
|
|
7
8
|
|
|
8
9
|
from .caselessdict import CaselessDict
|
|
9
10
|
from .parser import Parameters
|
|
11
|
+
from .parser_tools import ICAL_TYPE
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"DURATION_REGEX",
|
|
15
|
+
"TimeBase",
|
|
16
|
+
"TypesFactory",
|
|
17
|
+
"WEEKDAY_RULE",
|
|
18
|
+
"tzid_from_dt",
|
|
19
|
+
"vBinary",
|
|
20
|
+
"vBoolean",
|
|
21
|
+
"vCalAddress",
|
|
22
|
+
"vCategory",
|
|
23
|
+
"vDDDLists",
|
|
24
|
+
"vDDDTypes",
|
|
25
|
+
"vDate",
|
|
26
|
+
"vDatetime",
|
|
27
|
+
"vDuration",
|
|
28
|
+
"vFloat",
|
|
29
|
+
"vFrequency",
|
|
30
|
+
"vGeo",
|
|
31
|
+
"vInline",
|
|
32
|
+
"vInt",
|
|
33
|
+
"vMonth",
|
|
34
|
+
"vPeriod",
|
|
35
|
+
"vRecur",
|
|
36
|
+
"vSkip",
|
|
37
|
+
"vText",
|
|
38
|
+
"vTime",
|
|
39
|
+
"vUTCOffset",
|
|
40
|
+
"vUri",
|
|
41
|
+
"vWeekday",
|
|
42
|
+
]
|
|
10
43
|
|
|
11
44
|
_PropType: TypeAlias = type[Any] # any of the v* classes in this file
|
|
45
|
+
_vRecurT = TypeVar("_vRecurT", bound=vRecur)
|
|
12
46
|
|
|
13
47
|
DURATION_REGEX: Final[Pattern[str]]
|
|
14
48
|
WEEKDAY_RULE: Final[Pattern[str]]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
STDOFFSET: Final[datetime.timedelta]
|
|
18
|
-
DSTOFFSET: Final[datetime.timedelta]
|
|
19
|
-
DSTDIFF: Final[datetime.timedelta]
|
|
20
|
-
|
|
21
|
-
class FixedOffset(tzinfo):
|
|
22
|
-
def __init__(self, offset, name) -> None: ...
|
|
23
|
-
def utcoffset(self, dt): ...
|
|
24
|
-
def tzname(self, dt): ...
|
|
25
|
-
def dst(self, dt): ...
|
|
26
|
-
|
|
27
|
-
class LocalTimezone(tzinfo):
|
|
28
|
-
def utcoffset(self, dt): ...
|
|
29
|
-
def dst(self, dt): ...
|
|
30
|
-
def tzname(self, dt): ...
|
|
49
|
+
|
|
50
|
+
def tzid_from_dt(dt: datetime.datetime) -> str | None: ...
|
|
31
51
|
|
|
32
52
|
class vBinary:
|
|
33
53
|
obj: Incomplete
|
|
34
|
-
params:
|
|
54
|
+
params: Parameters
|
|
35
55
|
def __init__(self, obj) -> None: ...
|
|
36
|
-
def to_ical(self): ...
|
|
56
|
+
def to_ical(self) -> bytes: ...
|
|
37
57
|
@staticmethod
|
|
38
58
|
def from_ical(ical): ...
|
|
39
59
|
def __eq__(self, other): ...
|
|
40
60
|
|
|
41
61
|
class vBoolean(int):
|
|
42
62
|
BOOL_MAP: Incomplete
|
|
43
|
-
params:
|
|
63
|
+
params: Parameters
|
|
44
64
|
def __new__(cls, *args, **kwargs): ...
|
|
45
|
-
def to_ical(self): ...
|
|
65
|
+
def to_ical(self) -> bytes: ...
|
|
46
66
|
@classmethod
|
|
47
67
|
def from_ical(cls, ical): ...
|
|
48
68
|
|
|
69
|
+
class vText(str):
|
|
70
|
+
encoding: str
|
|
71
|
+
params: Parameters
|
|
72
|
+
def __new__(cls, value: ICAL_TYPE, encoding: str = "utf-8") -> Self: ...
|
|
73
|
+
def to_ical(self) -> bytes: ...
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_ical(cls, ical: ICAL_TYPE) -> Self: ...
|
|
76
|
+
|
|
49
77
|
class vCalAddress(str):
|
|
50
|
-
params:
|
|
78
|
+
params: Parameters
|
|
51
79
|
def __new__(cls, value, encoding="utf-8"): ...
|
|
52
|
-
def to_ical(self): ...
|
|
80
|
+
def to_ical(self) -> bytes: ...
|
|
53
81
|
@classmethod
|
|
54
82
|
def from_ical(cls, ical): ...
|
|
55
83
|
|
|
56
84
|
class vFloat(float):
|
|
57
|
-
params:
|
|
85
|
+
params: Parameters
|
|
58
86
|
def __new__(cls, *args, **kwargs): ...
|
|
59
|
-
def to_ical(self): ...
|
|
87
|
+
def to_ical(self) -> bytes: ...
|
|
60
88
|
@classmethod
|
|
61
89
|
def from_ical(cls, ical): ...
|
|
62
90
|
|
|
63
91
|
class vInt(int):
|
|
64
|
-
params:
|
|
92
|
+
params: Parameters
|
|
65
93
|
def __new__(cls, *args, **kwargs): ...
|
|
66
|
-
def to_ical(self): ...
|
|
94
|
+
def to_ical(self) -> bytes: ...
|
|
67
95
|
@classmethod
|
|
68
|
-
def from_ical(cls, ical): ...
|
|
96
|
+
def from_ical(cls, ical: ICAL_TYPE) -> Self: ...
|
|
69
97
|
|
|
70
98
|
class vDDDLists:
|
|
71
|
-
params:
|
|
99
|
+
params: Parameters
|
|
72
100
|
dts: Incomplete
|
|
73
101
|
def __init__(self, dt_list) -> None: ...
|
|
74
|
-
def to_ical(self): ...
|
|
102
|
+
def to_ical(self) -> bytes: ...
|
|
75
103
|
@staticmethod
|
|
76
104
|
def from_ical(ical, timezone: Incomplete | None = None): ...
|
|
77
105
|
def __eq__(self, other): ...
|
|
78
106
|
|
|
79
107
|
class vCategory:
|
|
80
108
|
cats: Incomplete
|
|
81
|
-
params:
|
|
109
|
+
params: Parameters
|
|
82
110
|
def __init__(self, c_list) -> None: ...
|
|
83
|
-
def
|
|
111
|
+
def __iter__(self) -> Iterator[str]: ...
|
|
112
|
+
def to_ical(self) -> bytes: ...
|
|
84
113
|
@staticmethod
|
|
85
|
-
def from_ical(ical): ...
|
|
86
|
-
def __eq__(self, other): ...
|
|
114
|
+
def from_ical(ical: ICAL_TYPE) -> str: ...
|
|
115
|
+
def __eq__(self, other: object) -> bool: ...
|
|
87
116
|
|
|
88
117
|
class TimeBase:
|
|
89
|
-
def __eq__(self, other): ...
|
|
118
|
+
def __eq__(self, other: object) -> bool: ...
|
|
90
119
|
def __hash__(self): ...
|
|
91
120
|
|
|
92
121
|
class vDDDTypes(TimeBase):
|
|
93
|
-
params:
|
|
122
|
+
params: Parameters
|
|
94
123
|
dt: Incomplete
|
|
95
124
|
def __init__(self, dt) -> None: ...
|
|
96
|
-
def to_ical(self): ...
|
|
125
|
+
def to_ical(self) -> bytes: ...
|
|
97
126
|
@classmethod
|
|
98
127
|
def from_ical(cls, ical, timezone: Incomplete | None = None): ...
|
|
99
128
|
|
|
100
129
|
class vDate(TimeBase):
|
|
101
130
|
dt: Incomplete
|
|
102
|
-
params:
|
|
131
|
+
params: Parameters
|
|
103
132
|
def __init__(self, dt) -> None: ...
|
|
104
|
-
def to_ical(self): ...
|
|
133
|
+
def to_ical(self) -> bytes: ...
|
|
105
134
|
@staticmethod
|
|
106
135
|
def from_ical(ical): ...
|
|
107
136
|
|
|
108
137
|
class vDatetime(TimeBase):
|
|
109
138
|
dt: Incomplete
|
|
110
|
-
params:
|
|
139
|
+
params: Parameters
|
|
111
140
|
def __init__(self, dt) -> None: ...
|
|
112
|
-
def to_ical(self): ...
|
|
141
|
+
def to_ical(self) -> bytes: ...
|
|
113
142
|
@staticmethod
|
|
114
|
-
def from_ical(ical, timezone:
|
|
143
|
+
def from_ical(ical, timezone: str | None = None) -> datetime.datetime: ...
|
|
115
144
|
|
|
116
145
|
class vDuration(TimeBase):
|
|
117
146
|
td: Incomplete
|
|
118
|
-
params:
|
|
147
|
+
params: Parameters
|
|
119
148
|
def __init__(self, td) -> None: ...
|
|
120
|
-
def to_ical(self): ...
|
|
149
|
+
def to_ical(self) -> bytes: ...
|
|
121
150
|
@staticmethod
|
|
122
151
|
def from_ical(ical): ...
|
|
123
152
|
@property
|
|
124
153
|
def dt(self): ...
|
|
125
154
|
|
|
126
155
|
class vPeriod(TimeBase):
|
|
127
|
-
params:
|
|
156
|
+
params: Parameters
|
|
128
157
|
start: Incomplete
|
|
129
158
|
end: Incomplete
|
|
130
159
|
by_duration: Incomplete
|
|
131
160
|
duration: Incomplete
|
|
132
161
|
def __init__(self, per) -> None: ...
|
|
133
162
|
def overlaps(self, other): ...
|
|
134
|
-
def to_ical(self): ...
|
|
163
|
+
def to_ical(self) -> bytes: ...
|
|
135
164
|
@staticmethod
|
|
136
165
|
def from_ical(ical, timezone: Incomplete | None = None): ...
|
|
137
166
|
@property
|
|
@@ -140,61 +169,72 @@ class vPeriod(TimeBase):
|
|
|
140
169
|
class vWeekday(str):
|
|
141
170
|
week_days: Incomplete
|
|
142
171
|
relative: Incomplete
|
|
143
|
-
params:
|
|
172
|
+
params: Parameters
|
|
144
173
|
def __new__(cls, value, encoding="utf-8"): ...
|
|
145
|
-
def to_ical(self): ...
|
|
174
|
+
def to_ical(self) -> bytes: ...
|
|
146
175
|
@classmethod
|
|
147
176
|
def from_ical(cls, ical): ...
|
|
148
177
|
|
|
149
178
|
class vFrequency(str):
|
|
150
179
|
frequencies: Incomplete
|
|
151
|
-
params:
|
|
180
|
+
params: Parameters
|
|
152
181
|
def __new__(cls, value, encoding="utf-8"): ...
|
|
153
|
-
def to_ical(self): ...
|
|
182
|
+
def to_ical(self) -> bytes: ...
|
|
154
183
|
@classmethod
|
|
155
184
|
def from_ical(cls, ical): ...
|
|
156
185
|
|
|
186
|
+
class vMonth(int):
|
|
187
|
+
leap: bool
|
|
188
|
+
params: Parameters
|
|
189
|
+
def __new__(cls, month: vMonth | str | int) -> Self: ...
|
|
190
|
+
def to_ical(self) -> bytes: ...
|
|
191
|
+
@classmethod
|
|
192
|
+
def from_ical(cls, ical: vMonth | str | int) -> Self: ...
|
|
193
|
+
|
|
194
|
+
class vSkip(vText, Enum):
|
|
195
|
+
OMIT = "OMIT"
|
|
196
|
+
FORWARD = "FORWARD"
|
|
197
|
+
BACKWARD = "BACKWARD"
|
|
198
|
+
|
|
199
|
+
def __reduce_ex__(self, proto: Unused) -> tuple[Any, ...]: ...
|
|
200
|
+
|
|
157
201
|
class vRecur(CaselessDict[Incomplete]):
|
|
158
202
|
frequencies: ClassVar[list[str]]
|
|
159
203
|
canonical_order: ClassVar[tuple[str, ...]]
|
|
160
204
|
types: ClassVar[CaselessDict[_PropType]]
|
|
161
205
|
params: Parameters
|
|
162
206
|
def __init__(self, *args, **kwargs) -> None: ...
|
|
163
|
-
def to_ical(self): ...
|
|
207
|
+
def to_ical(self) -> bytes: ...
|
|
164
208
|
@classmethod
|
|
165
209
|
def parse_type(cls, key, values): ...
|
|
166
210
|
@classmethod
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
class vText(str):
|
|
170
|
-
encoding: Incomplete
|
|
171
|
-
params: Incomplete
|
|
172
|
-
def __new__(cls, value, encoding="utf-8"): ...
|
|
173
|
-
def to_ical(self): ...
|
|
211
|
+
@overload
|
|
212
|
+
def from_ical(cls, ical: _vRecurT) -> _vRecurT: ...
|
|
174
213
|
@classmethod
|
|
175
|
-
|
|
214
|
+
@overload
|
|
215
|
+
def from_ical(cls, ical: str) -> Self: ...
|
|
176
216
|
|
|
177
217
|
class vTime(TimeBase):
|
|
178
218
|
dt: Incomplete
|
|
179
|
-
params:
|
|
219
|
+
params: Parameters
|
|
180
220
|
def __init__(self, *args) -> None: ...
|
|
181
|
-
def to_ical(self): ...
|
|
221
|
+
def to_ical(self) -> bytes: ...
|
|
182
222
|
@staticmethod
|
|
183
223
|
def from_ical(ical): ...
|
|
184
224
|
|
|
185
225
|
class vUri(str):
|
|
186
|
-
params:
|
|
226
|
+
params: Parameters
|
|
187
227
|
def __new__(cls, value, encoding="utf-8"): ...
|
|
188
|
-
def to_ical(self): ...
|
|
228
|
+
def to_ical(self) -> bytes: ...
|
|
189
229
|
@classmethod
|
|
190
230
|
def from_ical(cls, ical): ...
|
|
191
231
|
|
|
192
232
|
class vGeo:
|
|
193
233
|
latitude: Incomplete
|
|
194
234
|
longitude: Incomplete
|
|
195
|
-
params:
|
|
235
|
+
params: Parameters
|
|
196
236
|
def __init__(self, geo) -> None: ...
|
|
197
|
-
def to_ical(self): ...
|
|
237
|
+
def to_ical(self) -> bytes: ...
|
|
198
238
|
@staticmethod
|
|
199
239
|
def from_ical(ical): ...
|
|
200
240
|
def __eq__(self, other): ...
|
|
@@ -202,17 +242,17 @@ class vGeo:
|
|
|
202
242
|
class vUTCOffset:
|
|
203
243
|
ignore_exceptions: bool
|
|
204
244
|
td: Incomplete
|
|
205
|
-
params:
|
|
245
|
+
params: Parameters
|
|
206
246
|
def __init__(self, td) -> None: ...
|
|
207
|
-
def to_ical(self): ...
|
|
247
|
+
def to_ical(self) -> bytes: ...
|
|
208
248
|
@classmethod
|
|
209
249
|
def from_ical(cls, ical): ...
|
|
210
250
|
def __eq__(self, other): ...
|
|
211
251
|
|
|
212
252
|
class vInline(str):
|
|
213
|
-
params:
|
|
253
|
+
params: Parameters
|
|
214
254
|
def __new__(cls, value, encoding="utf-8"): ...
|
|
215
|
-
def to_ical(self): ...
|
|
255
|
+
def to_ical(self) -> bytes: ...
|
|
216
256
|
@classmethod
|
|
217
257
|
def from_ical(cls, ical): ...
|
|
218
258
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
__all__ = ["TZProvider"]
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from abc import ABC, abstractmethod
|
|
5
|
+
|
|
6
|
+
from dateutil.rrule import rrule
|
|
7
|
+
|
|
8
|
+
from ..prop import vRecur
|
|
9
|
+
|
|
10
|
+
class TZProvider(ABC):
|
|
11
|
+
@property
|
|
12
|
+
@abstractmethod
|
|
13
|
+
def name(self) -> str: ...
|
|
14
|
+
@abstractmethod
|
|
15
|
+
def localize_utc(self, dt: datetime.datetime) -> datetime.datetime: ...
|
|
16
|
+
@abstractmethod
|
|
17
|
+
def localize(self, dt: datetime.datetime, tz: datetime.tzinfo) -> datetime.datetime: ...
|
|
18
|
+
@abstractmethod
|
|
19
|
+
def knows_timezone_id(self, id: str) -> bool: ...
|
|
20
|
+
@abstractmethod
|
|
21
|
+
def fix_rrule_until(self, rrule: rrule, ical_rrule: vRecur) -> None: ...
|
|
22
|
+
@abstractmethod
|
|
23
|
+
def create_timezone(self, name: str, transition_times, transition_info) -> datetime.tzinfo: ...
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def timezone(self, name: str) -> datetime.tzinfo | None: ...
|
|
26
|
+
@abstractmethod
|
|
27
|
+
def uses_pytz(self) -> bool: ...
|
|
28
|
+
@abstractmethod
|
|
29
|
+
def uses_zoneinfo(self) -> bool: ...
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
__all__ = ["PYTZ"]
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from dateutil.rrule import rrule
|
|
7
|
+
|
|
8
|
+
from ..cal import Timezone
|
|
9
|
+
from ..prop import vRecur
|
|
10
|
+
from .provider import TZProvider
|
|
11
|
+
|
|
12
|
+
class PYTZ(TZProvider):
|
|
13
|
+
@property
|
|
14
|
+
def name(self) -> Literal["pytz"]: ...
|
|
15
|
+
def localize_utc(self, dt: datetime.datetime) -> datetime.datetime: ...
|
|
16
|
+
def localize(self, dt: datetime.datetime, tz: datetime.tzinfo) -> datetime.datetime: ...
|
|
17
|
+
def knows_timezone_id(self, id: str) -> bool: ...
|
|
18
|
+
def fix_rrule_until(self, rrule: rrule, ical_rrule: vRecur) -> None: ...
|
|
19
|
+
def create_timezone(self, tz: Timezone) -> datetime.tzinfo: ... # type: ignore[override]
|
|
20
|
+
def timezone(self, name: str) -> datetime.tzinfo | None: ...
|
|
21
|
+
def uses_pytz(self) -> bool: ...
|
|
22
|
+
def uses_zoneinfo(self) -> bool: ...
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import Final
|
|
3
|
+
|
|
4
|
+
from dateutil.rrule import rrule
|
|
5
|
+
|
|
6
|
+
from ..cal import Timezone
|
|
7
|
+
from ..prop import vRecur
|
|
8
|
+
from .provider import TZProvider
|
|
9
|
+
|
|
10
|
+
__all__ = ["TZP"]
|
|
11
|
+
|
|
12
|
+
DEFAULT_TIMEZONE_PROVIDER: Final = "zoneinfo"
|
|
13
|
+
|
|
14
|
+
class TZP:
|
|
15
|
+
def __init__(self, provider: str | TZProvider = "zoneinfo") -> None: ...
|
|
16
|
+
def use_pytz(self) -> None: ...
|
|
17
|
+
def use_zoneinfo(self) -> None: ...
|
|
18
|
+
def use(self, provider: str | TZProvider) -> None: ...
|
|
19
|
+
def use_default(self) -> None: ...
|
|
20
|
+
def localize_utc(self, dt: datetime.datetime) -> datetime.datetime: ...
|
|
21
|
+
def localize(self, dt: datetime.datetime, tz: datetime.tzinfo | str) -> datetime.datetime: ...
|
|
22
|
+
def cache_timezone_component(self, timezone_component: Timezone) -> None: ...
|
|
23
|
+
def fix_rrule_until(self, rrule: rrule, ical_rrule: vRecur) -> None: ...
|
|
24
|
+
def create_timezone(self, timezone_component: Timezone) -> datetime.tzinfo: ...
|
|
25
|
+
def clean_timezone_id(self, tzid: str) -> str: ...
|
|
26
|
+
def timezone(self, id: str) -> datetime.tzinfo | None: ...
|
|
27
|
+
def uses_pytz(self) -> bool: ...
|
|
28
|
+
def uses_zoneinfo(self) -> bool: ...
|
|
29
|
+
@property
|
|
30
|
+
def name(self) -> str: ...
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
import sys
|
|
3
|
+
from typing import Final, Literal
|
|
4
|
+
|
|
5
|
+
from dateutil.rrule import rrule, rruleset
|
|
6
|
+
|
|
7
|
+
if sys.version_info >= (3, 9):
|
|
8
|
+
from zoneinfo import ZoneInfo
|
|
9
|
+
else:
|
|
10
|
+
from backports.zoneinfo import ZoneInfo
|
|
11
|
+
|
|
12
|
+
from ..cal import Timezone
|
|
13
|
+
from ..prop import vRecur
|
|
14
|
+
from .provider import TZProvider
|
|
15
|
+
|
|
16
|
+
__all__ = ["ZONEINFO"]
|
|
17
|
+
|
|
18
|
+
class ZONEINFO(TZProvider):
|
|
19
|
+
@property
|
|
20
|
+
def name(self) -> Literal["zoneinfo"]: ...
|
|
21
|
+
utc: Final[ZoneInfo]
|
|
22
|
+
def localize(self, dt: datetime.datetime, tz: ZoneInfo) -> datetime.datetime: ... # type: ignore[override]
|
|
23
|
+
def localize_utc(self, dt: datetime.datetime) -> datetime.datetime: ...
|
|
24
|
+
def timezone(self, name: str) -> datetime.tzinfo | None: ...
|
|
25
|
+
def knows_timezone_id(self, id: str) -> bool: ...
|
|
26
|
+
def fix_rrule_until(self, rrule: rrule, ical_rrule: vRecur) -> None: ...
|
|
27
|
+
def create_timezone(self, tz: Timezone) -> datetime.tzinfo: ... # type: ignore[override]
|
|
28
|
+
def uses_pytz(self) -> Literal[False]: ...
|
|
29
|
+
def uses_zoneinfo(self) -> Literal[True]: ...
|
|
30
|
+
|
|
31
|
+
def pickle_tzicalvtz(tzicalvtz): ...
|
|
32
|
+
def pickle_rruleset_with_cache(rs: rruleset): ...
|
|
33
|
+
def unpickle_rruleset_with_cache(rrule, rdate, exrule, exdate, cache): ...
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from collections.abc import Iterator, MutableMapping
|
|
3
|
+
from typing import Any, NamedTuple
|
|
4
|
+
|
|
5
|
+
def base64url_encode(payload: str | bytes) -> str: ...
|
|
6
|
+
def base64url_decode(payload: str) -> bytes: ...
|
|
7
|
+
def json_encode(string: str | bytes) -> str: ...
|
|
8
|
+
|
|
9
|
+
# The function returns json.loads which returns Any
|
|
10
|
+
def json_decode(string: str | bytes) -> Any: ...
|
|
11
|
+
|
|
12
|
+
class JWException(Exception): ...
|
|
13
|
+
|
|
14
|
+
class InvalidJWAAlgorithm(JWException):
|
|
15
|
+
def __init__(self, message: str | None = None) -> None: ...
|
|
16
|
+
|
|
17
|
+
class InvalidCEKeyLength(JWException):
|
|
18
|
+
def __init__(self, expected: int, obtained: int) -> None: ...
|
|
19
|
+
|
|
20
|
+
class InvalidJWEOperation(JWException):
|
|
21
|
+
def __init__(self, message: str | None = None, exception: BaseException | None = None) -> None: ...
|
|
22
|
+
|
|
23
|
+
class InvalidJWEKeyType(JWException):
|
|
24
|
+
def __init__(self, expected: int, obtained: int) -> None: ...
|
|
25
|
+
|
|
26
|
+
class InvalidJWEKeyLength(JWException):
|
|
27
|
+
def __init__(self, expected: int, obtained: int) -> None: ...
|
|
28
|
+
|
|
29
|
+
class InvalidJWSERegOperation(JWException):
|
|
30
|
+
def __init__(self, message: str | None = None, exception: BaseException | None = None) -> None: ...
|
|
31
|
+
|
|
32
|
+
class JWKeyNotFound(JWException):
|
|
33
|
+
def __init__(self, message: str | None = None) -> None: ...
|
|
34
|
+
|
|
35
|
+
class JWSEHeaderParameter(NamedTuple):
|
|
36
|
+
description: str
|
|
37
|
+
mustprotect: bool
|
|
38
|
+
supported: bool
|
|
39
|
+
check_fn: Incomplete | None
|
|
40
|
+
|
|
41
|
+
class JWSEHeaderRegistry(MutableMapping[str, JWSEHeaderParameter]):
|
|
42
|
+
def __init__(self, init_registry: Incomplete | None = None) -> None: ...
|
|
43
|
+
def check_header(self, h: str, value) -> bool: ...
|
|
44
|
+
def __getitem__(self, key: str) -> JWSEHeaderParameter: ...
|
|
45
|
+
def __iter__(self) -> Iterator[str]: ...
|
|
46
|
+
def __delitem__(self, key: str) -> None: ...
|
|
47
|
+
def __setitem__(self, h: str, jwse_header_param: JWSEHeaderParameter) -> None: ...
|
|
48
|
+
def __len__(self) -> int: ...
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from abc import ABCMeta, abstractmethod
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import ClassVar
|
|
4
|
+
|
|
5
|
+
default_max_pbkdf2_iterations: int
|
|
6
|
+
|
|
7
|
+
class JWAAlgorithm(metaclass=ABCMeta):
|
|
8
|
+
@property
|
|
9
|
+
@abstractmethod
|
|
10
|
+
def name(self) -> str: ...
|
|
11
|
+
@property
|
|
12
|
+
@abstractmethod
|
|
13
|
+
def description(self) -> str: ...
|
|
14
|
+
@property
|
|
15
|
+
@abstractmethod
|
|
16
|
+
def keysize(self) -> int: ...
|
|
17
|
+
@property
|
|
18
|
+
@abstractmethod
|
|
19
|
+
def algorithm_usage_location(self) -> str: ...
|
|
20
|
+
@property
|
|
21
|
+
@abstractmethod
|
|
22
|
+
def algorithm_use(self) -> str: ...
|
|
23
|
+
@property
|
|
24
|
+
def input_keysize(self) -> int: ...
|
|
25
|
+
|
|
26
|
+
class JWA:
|
|
27
|
+
algorithms_registry: ClassVar[Mapping[str, JWAAlgorithm]]
|
|
28
|
+
@classmethod
|
|
29
|
+
def instantiate_alg(cls, name: str, use: str | None = None) -> JWAAlgorithm: ...
|
|
30
|
+
@classmethod
|
|
31
|
+
def signing_alg(cls, name: str) -> JWAAlgorithm: ...
|
|
32
|
+
@classmethod
|
|
33
|
+
def keymgmt_alg(cls, name: str) -> JWAAlgorithm: ...
|
|
34
|
+
@classmethod
|
|
35
|
+
def encryption_alg(cls, name: str) -> JWAAlgorithm: ...
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from collections.abc import Mapping, Sequence
|
|
3
|
+
|
|
4
|
+
from jwcrypto import common
|
|
5
|
+
from jwcrypto.common import JWException, JWSEHeaderParameter
|
|
6
|
+
from jwcrypto.jwk import JWK, JWKSet
|
|
7
|
+
|
|
8
|
+
default_max_compressed_size: int
|
|
9
|
+
JWEHeaderRegistry: Mapping[str, JWSEHeaderParameter]
|
|
10
|
+
default_allowed_algs: Sequence[str]
|
|
11
|
+
|
|
12
|
+
class InvalidJWEData(JWException):
|
|
13
|
+
def __init__(self, message: str | None = None, exception: BaseException | None = None) -> None: ...
|
|
14
|
+
|
|
15
|
+
InvalidCEKeyLength = common.InvalidCEKeyLength
|
|
16
|
+
InvalidJWEKeyLength = common.InvalidJWEKeyLength
|
|
17
|
+
InvalidJWEKeyType = common.InvalidJWEKeyType
|
|
18
|
+
InvalidJWEOperation = common.InvalidJWEOperation
|
|
19
|
+
|
|
20
|
+
class JWE:
|
|
21
|
+
objects: Incomplete
|
|
22
|
+
plaintext: Incomplete
|
|
23
|
+
header_registry: Incomplete
|
|
24
|
+
cek: Incomplete
|
|
25
|
+
decryptlog: Incomplete
|
|
26
|
+
def __init__(
|
|
27
|
+
self,
|
|
28
|
+
plaintext: bytes | None = None,
|
|
29
|
+
protected: str | None = None,
|
|
30
|
+
unprotected: str | None = None,
|
|
31
|
+
aad: bytes | None = None,
|
|
32
|
+
algs: Incomplete | None = None,
|
|
33
|
+
recipient: str | None = None,
|
|
34
|
+
header: Incomplete | None = None,
|
|
35
|
+
header_registry: Incomplete | None = None,
|
|
36
|
+
) -> None: ...
|
|
37
|
+
@property
|
|
38
|
+
def allowed_algs(self): ...
|
|
39
|
+
@allowed_algs.setter
|
|
40
|
+
def allowed_algs(self, algs) -> None: ...
|
|
41
|
+
def add_recipient(self, key, header: Incomplete | None = None) -> None: ...
|
|
42
|
+
def serialize(self, compact: bool = False): ...
|
|
43
|
+
def decrypt(self, key: JWK | JWKSet) -> None: ...
|
|
44
|
+
def deserialize(self, raw_jwe: str | bytes, key: JWK | JWKSet | None = None) -> None: ...
|
|
45
|
+
@property
|
|
46
|
+
def payload(self): ...
|
|
47
|
+
@property
|
|
48
|
+
def jose_header(self) -> dict[Incomplete, Incomplete]: ...
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_jose_token(cls, token: str | bytes) -> JWE: ...
|
|
51
|
+
def __eq__(self, other: object) -> bool: ...
|