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,342 +0,0 @@
|
|
|
1
|
-
from _typeshed import Incomplete, SupportsRead, SupportsWrite, Unused
|
|
2
|
-
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
|
|
3
|
-
from enum import IntEnum
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
from typing import Any, ClassVar, Final, Literal, Protocol, SupportsBytes
|
|
6
|
-
from typing_extensions import Self, TypeAlias, TypeGuard
|
|
7
|
-
|
|
8
|
-
from PIL.PyAccess import PyAccess
|
|
9
|
-
|
|
10
|
-
from ._imaging import (
|
|
11
|
-
DEFAULT_STRATEGY as DEFAULT_STRATEGY,
|
|
12
|
-
FILTERED as FILTERED,
|
|
13
|
-
FIXED as FIXED,
|
|
14
|
-
HUFFMAN_ONLY as HUFFMAN_ONLY,
|
|
15
|
-
RLE as RLE,
|
|
16
|
-
_PixelAccessor,
|
|
17
|
-
)
|
|
18
|
-
from .ImageFilter import Filter
|
|
19
|
-
from .ImagePalette import ImagePalette
|
|
20
|
-
|
|
21
|
-
_Mode: TypeAlias = str
|
|
22
|
-
_Resample: TypeAlias = Literal[0, 1, 2, 3, 4, 5]
|
|
23
|
-
_Size: TypeAlias = tuple[int, int]
|
|
24
|
-
_Box: TypeAlias = tuple[int, int, int, int]
|
|
25
|
-
|
|
26
|
-
_ConversionMatrix: TypeAlias = (
|
|
27
|
-
tuple[float, float, float, float] | tuple[float, float, float, float, float, float, float, float, float, float, float, float]
|
|
28
|
-
)
|
|
29
|
-
# `str` values are only accepted if mode="RGB" for an `Image` object
|
|
30
|
-
# `float` values are only accepted for certain modes such as "F"
|
|
31
|
-
# See https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.new
|
|
32
|
-
_Color: TypeAlias = (
|
|
33
|
-
int | tuple[int] | tuple[int, int] | tuple[int, int, int] | tuple[int, int, int, int] | str | float | tuple[float]
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
class _Writeable(SupportsWrite[bytes], Protocol):
|
|
37
|
-
def seek(self, offset: int, /) -> Any: ...
|
|
38
|
-
|
|
39
|
-
# Ref: https://numpy.org/doc/stable/reference/arrays.interface.html#python-side
|
|
40
|
-
class _SupportsArrayInterface(Protocol):
|
|
41
|
-
@property
|
|
42
|
-
def __array_interface__(self) -> dict[str, Any]: ...
|
|
43
|
-
|
|
44
|
-
class DecompressionBombWarning(RuntimeWarning): ...
|
|
45
|
-
class DecompressionBombError(Exception): ...
|
|
46
|
-
|
|
47
|
-
# Despite the ALL_CAPS spelling, Pillow's docs mention that this threshold can
|
|
48
|
-
# be altered at runtime. See
|
|
49
|
-
# https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.open
|
|
50
|
-
# or the permalink
|
|
51
|
-
# https://github.com/python-pillow/Pillow/blob/10.0.0/docs/reference/Image.rst?plain=1#L54-L55
|
|
52
|
-
MAX_IMAGE_PIXELS: int | None
|
|
53
|
-
|
|
54
|
-
USE_CFFI_ACCESS: bool
|
|
55
|
-
|
|
56
|
-
def isImageType(t: object) -> TypeGuard[Image]: ...
|
|
57
|
-
|
|
58
|
-
class Transpose(IntEnum):
|
|
59
|
-
FLIP_LEFT_RIGHT = 0
|
|
60
|
-
FLIP_TOP_BOTTOM = 1
|
|
61
|
-
ROTATE_90 = 2
|
|
62
|
-
ROTATE_180 = 3
|
|
63
|
-
ROTATE_270 = 4
|
|
64
|
-
TRANSPOSE = 5
|
|
65
|
-
TRANSVERSE = 6
|
|
66
|
-
|
|
67
|
-
# All Transpose items
|
|
68
|
-
FLIP_LEFT_RIGHT: Final = 0
|
|
69
|
-
FLIP_TOP_BOTTOM: Final = 1
|
|
70
|
-
ROTATE_90: Final = 2
|
|
71
|
-
ROTATE_180: Final = 3
|
|
72
|
-
ROTATE_270: Final = 4
|
|
73
|
-
TRANSPOSE: Final = 5
|
|
74
|
-
TRANSVERSE: Final = 6
|
|
75
|
-
|
|
76
|
-
class Transform(IntEnum):
|
|
77
|
-
AFFINE = 0
|
|
78
|
-
EXTENT = 1
|
|
79
|
-
PERSPECTIVE = 2
|
|
80
|
-
QUAD = 3
|
|
81
|
-
MESH = 4
|
|
82
|
-
|
|
83
|
-
# All Transform items
|
|
84
|
-
AFFINE: Final = 0
|
|
85
|
-
EXTENT: Final = 1
|
|
86
|
-
PERSPECTIVE: Final = 2
|
|
87
|
-
QUAD: Final = 3
|
|
88
|
-
MESH: Final = 4
|
|
89
|
-
|
|
90
|
-
class Resampling(IntEnum):
|
|
91
|
-
NEAREST = 0
|
|
92
|
-
LANCZOS = 1
|
|
93
|
-
BILINEAR = 2
|
|
94
|
-
BICUBIC = 3
|
|
95
|
-
BOX = 4
|
|
96
|
-
HAMMING = 5
|
|
97
|
-
|
|
98
|
-
# All Resampling items
|
|
99
|
-
NEAREST: Final = 0
|
|
100
|
-
LANCZOS: Final = 1
|
|
101
|
-
BILINEAR: Final = 2
|
|
102
|
-
BICUBIC: Final = 3
|
|
103
|
-
BOX: Final = 4
|
|
104
|
-
HAMMING: Final = 5
|
|
105
|
-
|
|
106
|
-
class Dither(IntEnum):
|
|
107
|
-
NONE = 0
|
|
108
|
-
ORDERED = 1
|
|
109
|
-
RASTERIZE = 2
|
|
110
|
-
FLOYDSTEINBERG = 3
|
|
111
|
-
|
|
112
|
-
# All Dither items
|
|
113
|
-
NONE: Final = 0
|
|
114
|
-
ORDERED: Final = 1
|
|
115
|
-
RASTERIZE: Final = 2
|
|
116
|
-
FLOYDSTEINBERG: Final = 3
|
|
117
|
-
|
|
118
|
-
class Palette(IntEnum):
|
|
119
|
-
WEB = 0
|
|
120
|
-
ADAPTIVE = 1
|
|
121
|
-
|
|
122
|
-
# All Palette items
|
|
123
|
-
WEB: Final = 0
|
|
124
|
-
ADAPTIVE: Final = 1
|
|
125
|
-
|
|
126
|
-
class Quantize(IntEnum):
|
|
127
|
-
MEDIANCUT = 0
|
|
128
|
-
MAXCOVERAGE = 1
|
|
129
|
-
FASTOCTREE = 2
|
|
130
|
-
LIBIMAGEQUANT = 3
|
|
131
|
-
|
|
132
|
-
# All Quantize items
|
|
133
|
-
MEDIANCUT: Final = 0
|
|
134
|
-
MAXCOVERAGE: Final = 1
|
|
135
|
-
FASTOCTREE: Final = 2
|
|
136
|
-
LIBIMAGEQUANT: Final = 3
|
|
137
|
-
|
|
138
|
-
ID: list[str]
|
|
139
|
-
OPEN: dict[str, Any]
|
|
140
|
-
MIME: dict[str, str]
|
|
141
|
-
SAVE: dict[str, Any]
|
|
142
|
-
SAVE_ALL: dict[str, Any]
|
|
143
|
-
EXTENSION: dict[str, str]
|
|
144
|
-
DECODERS: dict[str, Any]
|
|
145
|
-
ENCODERS: dict[str, Any]
|
|
146
|
-
|
|
147
|
-
MODES: list[_Mode]
|
|
148
|
-
|
|
149
|
-
def getmodebase(mode: _Mode) -> Literal["L", "RGB"]: ...
|
|
150
|
-
def getmodetype(mode: _Mode) -> Literal["L", "I", "F"]: ...
|
|
151
|
-
def getmodebandnames(mode: _Mode) -> tuple[str, ...]: ...
|
|
152
|
-
def getmodebands(mode: _Mode) -> int: ...
|
|
153
|
-
def preinit() -> None: ...
|
|
154
|
-
def init() -> None: ...
|
|
155
|
-
|
|
156
|
-
class _E:
|
|
157
|
-
scale: Incomplete
|
|
158
|
-
offset: Incomplete
|
|
159
|
-
def __init__(self, scale, offset) -> None: ...
|
|
160
|
-
def __neg__(self) -> _E: ...
|
|
161
|
-
def __add__(self, other) -> _E: ...
|
|
162
|
-
__radd__ = __add__
|
|
163
|
-
def __sub__(self, other): ...
|
|
164
|
-
def __rsub__(self, other): ...
|
|
165
|
-
def __mul__(self, other) -> _E: ...
|
|
166
|
-
__rmul__ = __mul__
|
|
167
|
-
def __truediv__(self, other) -> _E: ...
|
|
168
|
-
|
|
169
|
-
_ImageState: TypeAlias = tuple[dict[str, Any], str, tuple[int, int], Any, bytes]
|
|
170
|
-
|
|
171
|
-
class Image:
|
|
172
|
-
format: ClassVar[str | None]
|
|
173
|
-
format_description: ClassVar[str | None]
|
|
174
|
-
im: Incomplete
|
|
175
|
-
palette: Incomplete
|
|
176
|
-
info: dict[Incomplete, Incomplete]
|
|
177
|
-
readonly: int
|
|
178
|
-
pyaccess: PyAccess | None
|
|
179
|
-
is_animated: bool # not present on all Image objects
|
|
180
|
-
n_frames: int # not present on all Image objects
|
|
181
|
-
# Only defined after a call to save().
|
|
182
|
-
encoderconfig: tuple[Incomplete, ...]
|
|
183
|
-
@property
|
|
184
|
-
def width(self) -> int: ...
|
|
185
|
-
@property
|
|
186
|
-
def height(self) -> int: ...
|
|
187
|
-
@property
|
|
188
|
-
def size(self) -> tuple[int, int]: ...
|
|
189
|
-
@property
|
|
190
|
-
def mode(self) -> _Mode: ...
|
|
191
|
-
def __enter__(self) -> Self: ...
|
|
192
|
-
def __exit__(self, *args: Unused) -> None: ...
|
|
193
|
-
def close(self) -> None: ...
|
|
194
|
-
def __eq__(self, other: object) -> bool: ...
|
|
195
|
-
@property
|
|
196
|
-
def __array_interface__(self): ...
|
|
197
|
-
def __getstate__(self) -> _ImageState: ...
|
|
198
|
-
def __setstate__(self, state: _ImageState) -> None: ...
|
|
199
|
-
def tobytes(self, encoder_name: str = "raw", *args) -> bytes: ...
|
|
200
|
-
def tobitmap(self, name: str = "image") -> bytes: ...
|
|
201
|
-
def frombytes(self, data: bytes, decoder_name: str = "raw", *args) -> None: ...
|
|
202
|
-
def load(self) -> _PixelAccessor: ...
|
|
203
|
-
def verify(self) -> None: ...
|
|
204
|
-
def convert(
|
|
205
|
-
self,
|
|
206
|
-
mode: _Mode | None = None,
|
|
207
|
-
matrix: _ConversionMatrix | None = None,
|
|
208
|
-
dither: int | None = None,
|
|
209
|
-
palette: Palette | Literal[0, 1] = ...,
|
|
210
|
-
colors: int = 256,
|
|
211
|
-
) -> Image: ...
|
|
212
|
-
def quantize(
|
|
213
|
-
self,
|
|
214
|
-
colors: int = 256,
|
|
215
|
-
method: Quantize | Literal[0, 1, 2, 3] | None = None,
|
|
216
|
-
kmeans: int = 0,
|
|
217
|
-
palette: Image | None = None,
|
|
218
|
-
dither: int = ...,
|
|
219
|
-
) -> Image: ...
|
|
220
|
-
def copy(self) -> Image: ...
|
|
221
|
-
__copy__ = copy
|
|
222
|
-
def crop(self, box: _Box | None = None) -> Image: ...
|
|
223
|
-
def draft(self, mode: _Mode, size: _Size) -> None: ...
|
|
224
|
-
def filter(self, filter: Filter | Callable[[], Filter]) -> Image: ...
|
|
225
|
-
def getbands(self) -> tuple[str, ...]: ...
|
|
226
|
-
def getbbox(self, *, alpha_only: bool = True) -> tuple[int, int, int, int] | None: ...
|
|
227
|
-
def getcolors(self, maxcolors: int = 256) -> list[tuple[int, int]]: ...
|
|
228
|
-
def getdata(self, band: int | None = None): ...
|
|
229
|
-
def getextrema(self): ...
|
|
230
|
-
def getexif(self) -> Exif: ...
|
|
231
|
-
def get_child_images(self) -> list[Image]: ...
|
|
232
|
-
def getim(self): ...
|
|
233
|
-
def getpalette(self, rawmode: str | None = "RGB") -> list[int] | None: ...
|
|
234
|
-
@property
|
|
235
|
-
def has_transparency_data(self) -> bool: ...
|
|
236
|
-
def apply_transparency(self) -> None: ...
|
|
237
|
-
def getpixel(self, xy: tuple[int, int]): ...
|
|
238
|
-
def getprojection(self) -> tuple[list[int], list[int]]: ...
|
|
239
|
-
def histogram(self, mask: Image | None = None, extrema: tuple[int, int] | tuple[float, float] | None = None) -> list[int]: ...
|
|
240
|
-
def entropy(self, mask: Image | None = None, extrema: tuple[int, int] | tuple[float, float] | None = None) -> float: ...
|
|
241
|
-
def paste(self, im: Image | _Color, box: tuple[int, int] | _Box | None = None, mask: Image | None = None) -> None: ...
|
|
242
|
-
def alpha_composite(self, im: Image, dest: tuple[int, int] = (0, 0), source: tuple[int, int] = (0, 0)) -> None: ...
|
|
243
|
-
def point(self, lut, mode: _Mode | None = None) -> Image: ...
|
|
244
|
-
def putalpha(self, alpha: Image | int) -> None: ...
|
|
245
|
-
def putdata(self, data: Sequence[int], scale: float = 1.0, offset: float = 0.0) -> None: ...
|
|
246
|
-
def putpalette(self, data: ImagePalette | bytes | Iterable[int] | SupportsBytes, rawmode: _Mode | None = "RGB") -> None: ...
|
|
247
|
-
def putpixel(self, xy: tuple[int, int], value: _Color | list[float]) -> None: ...
|
|
248
|
-
def remap_palette(self, dest_map: Iterable[int], source_palette: Sequence[int] | None = None) -> Image: ...
|
|
249
|
-
def resize(
|
|
250
|
-
self,
|
|
251
|
-
size: tuple[int, int],
|
|
252
|
-
resample: Resampling | _Resample | None = None,
|
|
253
|
-
box: tuple[float, float, float, float] | None = None,
|
|
254
|
-
reducing_gap: float | None = None,
|
|
255
|
-
) -> Image: ...
|
|
256
|
-
def reduce(self, factor: int | tuple[int, int] | list[int], box: _Box | None = None) -> Image: ...
|
|
257
|
-
def rotate(
|
|
258
|
-
self,
|
|
259
|
-
angle: float,
|
|
260
|
-
resample: Resampling | _Resample = ...,
|
|
261
|
-
expand: bool = ...,
|
|
262
|
-
center: tuple[float, float] | None = None,
|
|
263
|
-
translate: tuple[float, float] | None = None,
|
|
264
|
-
fillcolor: _Color | None = None,
|
|
265
|
-
) -> Image: ...
|
|
266
|
-
def save(
|
|
267
|
-
self,
|
|
268
|
-
fp: str | bytes | Path | _Writeable,
|
|
269
|
-
format: str | None = None,
|
|
270
|
-
*,
|
|
271
|
-
save_all: bool = ...,
|
|
272
|
-
bitmap_format: Literal["bmp", "png"] = ..., # for ICO files
|
|
273
|
-
optimize: bool = ...,
|
|
274
|
-
**params: Any,
|
|
275
|
-
) -> None: ...
|
|
276
|
-
def seek(self, frame: int) -> None: ...
|
|
277
|
-
def show(self, title: str | None = None) -> None: ...
|
|
278
|
-
def split(self) -> tuple[Image, ...]: ...
|
|
279
|
-
def getchannel(self, channel: int | str) -> Image: ...
|
|
280
|
-
def tell(self) -> int: ...
|
|
281
|
-
def thumbnail(self, size: tuple[int, int], resample: Resampling | _Resample = ..., reducing_gap: float = 2.0) -> None: ...
|
|
282
|
-
def transform(
|
|
283
|
-
self,
|
|
284
|
-
size: _Size,
|
|
285
|
-
method: Transform | Literal[0, 1, 2, 3, 4],
|
|
286
|
-
data=None,
|
|
287
|
-
resample: Resampling | _Resample = ...,
|
|
288
|
-
fill: int = 1,
|
|
289
|
-
fillcolor: _Color | int | None = None,
|
|
290
|
-
) -> Image: ...
|
|
291
|
-
def transpose(self, method: Transpose | Literal[0, 1, 2, 3, 4, 5, 6]) -> Image: ...
|
|
292
|
-
def effect_spread(self, distance: int) -> Image: ...
|
|
293
|
-
def toqimage(self): ...
|
|
294
|
-
def toqpixmap(self): ...
|
|
295
|
-
|
|
296
|
-
class ImagePointHandler: ...
|
|
297
|
-
class ImageTransformHandler: ...
|
|
298
|
-
|
|
299
|
-
def new(mode: _Mode, size: tuple[int, int], color: _Color = 0) -> Image: ...
|
|
300
|
-
def frombytes(mode: _Mode, size: tuple[int, int], data, decoder_name: str = "raw", *args) -> Image: ...
|
|
301
|
-
def frombuffer(mode: _Mode, size: tuple[int, int], data, decoder_name: str = "raw", *args) -> Image: ...
|
|
302
|
-
|
|
303
|
-
# If the __array_interface__ has "strides", then `obj` must also support `tobytes` or `tostring`, but we can't enforce that
|
|
304
|
-
def fromarray(obj: _SupportsArrayInterface, mode: _Mode | None = None) -> Image: ...
|
|
305
|
-
def fromqimage(im) -> Image: ...
|
|
306
|
-
def fromqpixmap(im) -> Image: ...
|
|
307
|
-
def open(
|
|
308
|
-
fp: str | bytes | Path | SupportsRead[bytes], mode: Literal["r"] = "r", formats: list[str] | tuple[str, ...] | None = None
|
|
309
|
-
) -> Image: ...
|
|
310
|
-
def alpha_composite(im1: Image, im2: Image) -> Image: ...
|
|
311
|
-
def blend(im1: Image, im2: Image, alpha: float) -> Image: ...
|
|
312
|
-
def composite(image1: Image, image2: Image, mask: Image) -> Image: ...
|
|
313
|
-
def eval(image: Image, *args) -> Image: ...
|
|
314
|
-
def merge(mode: _Mode, bands: Sequence[Image]) -> Image: ...
|
|
315
|
-
def register_open(id: str, factory, accept=None) -> None: ...
|
|
316
|
-
def register_mime(id: str, mimetype: str) -> None: ...
|
|
317
|
-
def register_save(id: str, driver) -> None: ...
|
|
318
|
-
def register_save_all(id: str, driver) -> None: ...
|
|
319
|
-
def register_extension(id: str, extension: str) -> None: ...
|
|
320
|
-
def register_extensions(id: str, extensions: Iterable[str]) -> None: ...
|
|
321
|
-
def registered_extensions() -> dict[str, str]: ...
|
|
322
|
-
def register_decoder(name: str, decoder) -> None: ...
|
|
323
|
-
def register_encoder(name: str, encoder) -> None: ...
|
|
324
|
-
def effect_mandelbrot(size: tuple[int, int], extent: tuple[float, float, float, float], quality: int) -> Image: ...
|
|
325
|
-
def effect_noise(size: tuple[int, int], sigma: float) -> Image: ...
|
|
326
|
-
def linear_gradient(mode: _Mode) -> Image: ...
|
|
327
|
-
def radial_gradient(mode: _Mode) -> Image: ...
|
|
328
|
-
|
|
329
|
-
class Exif(MutableMapping[int, Any]):
|
|
330
|
-
endian: Incomplete
|
|
331
|
-
bigtiff: bool
|
|
332
|
-
def load(self, data: bytes) -> None: ...
|
|
333
|
-
def load_from_fp(self, fp, offset: Incomplete | None = None) -> None: ...
|
|
334
|
-
def tobytes(self, offset: int = 8) -> bytes: ...
|
|
335
|
-
def get_ifd(self, tag: int): ...
|
|
336
|
-
def hide_offsets(self) -> None: ...
|
|
337
|
-
def __len__(self) -> int: ...
|
|
338
|
-
def __getitem__(self, tag: int) -> Any: ...
|
|
339
|
-
def __contains__(self, tag: object) -> bool: ...
|
|
340
|
-
def __setitem__(self, tag: int, value: Any) -> None: ...
|
|
341
|
-
def __delitem__(self, tag: int) -> None: ...
|
|
342
|
-
def __iter__(self) -> Iterator[int]: ...
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
from .Image import Image
|
|
2
|
-
|
|
3
|
-
def constant(image: Image, value: int) -> Image: ...
|
|
4
|
-
def duplicate(image: Image) -> Image: ...
|
|
5
|
-
def invert(image: Image) -> Image: ...
|
|
6
|
-
def lighter(image1: Image, image2: Image) -> Image: ...
|
|
7
|
-
def darker(image1: Image, image2: Image) -> Image: ...
|
|
8
|
-
def difference(image1: Image, image2: Image) -> Image: ...
|
|
9
|
-
def multiply(image1: Image, image2: Image) -> Image: ...
|
|
10
|
-
def screen(image1: Image, image2: Image) -> Image: ...
|
|
11
|
-
def soft_light(image1: Image, image2: Image) -> Image: ...
|
|
12
|
-
def hard_light(image1: Image, image2: Image) -> Image: ...
|
|
13
|
-
def overlay(image1: Image, image2: Image) -> Image: ...
|
|
14
|
-
def add(image1: Image, image2: Image, scale: float = 1.0, offset: int = 0) -> Image: ...
|
|
15
|
-
def subtract(image1: Image, image2: Image, scale: float = 1.0, offset: int = 0) -> Image: ...
|
|
16
|
-
def add_modulo(image1: Image, image2: Image) -> Image: ...
|
|
17
|
-
def subtract_modulo(image1: Image, image2: Image) -> Image: ...
|
|
18
|
-
def logical_and(image1: Image, image2: Image) -> Image: ...
|
|
19
|
-
def logical_or(image1: Image, image2: Image) -> Image: ...
|
|
20
|
-
def logical_xor(image1: Image, image2: Image) -> Image: ...
|
|
21
|
-
def blend(image1: Image, image2: Image, alpha: float) -> Image: ...
|
|
22
|
-
def composite(image1: Image, image2: Image, mask: Image) -> Image: ...
|
|
23
|
-
def offset(image: Image, xoffset: int, yoffset: int | None = None) -> Image: ...
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from _typeshed import Incomplete, Unused
|
|
3
|
-
from enum import IntEnum
|
|
4
|
-
|
|
5
|
-
from .Image import ImagePointHandler
|
|
6
|
-
|
|
7
|
-
DESCRIPTION: str
|
|
8
|
-
VERSION: str
|
|
9
|
-
core: Incomplete
|
|
10
|
-
|
|
11
|
-
class Intent(IntEnum):
|
|
12
|
-
PERCEPTUAL = 0
|
|
13
|
-
RELATIVE_COLORIMETRIC = 1
|
|
14
|
-
SATURATION = 2
|
|
15
|
-
ABSOLUTE_COLORIMETRIC = 3
|
|
16
|
-
|
|
17
|
-
class Direction(IntEnum):
|
|
18
|
-
INPUT = 0
|
|
19
|
-
OUTPUT = 1
|
|
20
|
-
PROOF = 2
|
|
21
|
-
|
|
22
|
-
FLAGS: Incomplete
|
|
23
|
-
|
|
24
|
-
class ImageCmsProfile:
|
|
25
|
-
def __init__(self, profile) -> None: ...
|
|
26
|
-
def tobytes(self): ...
|
|
27
|
-
|
|
28
|
-
class ImageCmsTransform(ImagePointHandler):
|
|
29
|
-
transform: Incomplete
|
|
30
|
-
input_mode: Incomplete
|
|
31
|
-
output_mode: Incomplete
|
|
32
|
-
output_profile: Incomplete
|
|
33
|
-
def __init__(
|
|
34
|
-
self,
|
|
35
|
-
input,
|
|
36
|
-
output,
|
|
37
|
-
input_mode,
|
|
38
|
-
output_mode,
|
|
39
|
-
intent=...,
|
|
40
|
-
proof: Incomplete | None = None,
|
|
41
|
-
proof_intent=...,
|
|
42
|
-
flags: int = 0,
|
|
43
|
-
) -> None: ...
|
|
44
|
-
def point(self, im): ...
|
|
45
|
-
def apply(self, im, imOut: Incomplete | None = None): ...
|
|
46
|
-
def apply_in_place(self, im): ...
|
|
47
|
-
|
|
48
|
-
if sys.platform == "win32":
|
|
49
|
-
def get_display_profile(handle: Incomplete | None = None) -> ImageCmsProfile | None: ...
|
|
50
|
-
|
|
51
|
-
else:
|
|
52
|
-
def get_display_profile(handle: Unused = None) -> None: ...
|
|
53
|
-
|
|
54
|
-
class PyCMSError(Exception): ...
|
|
55
|
-
|
|
56
|
-
def profileToProfile(
|
|
57
|
-
im,
|
|
58
|
-
inputProfile,
|
|
59
|
-
outputProfile,
|
|
60
|
-
renderingIntent=...,
|
|
61
|
-
outputMode: Incomplete | None = None,
|
|
62
|
-
inPlace: bool = False,
|
|
63
|
-
flags: int = 0,
|
|
64
|
-
): ...
|
|
65
|
-
def getOpenProfile(profileFilename): ...
|
|
66
|
-
def buildTransform(inputProfile, outputProfile, inMode, outMode, renderingIntent=..., flags: int = 0): ...
|
|
67
|
-
def buildProofTransform(
|
|
68
|
-
inputProfile, outputProfile, proofProfile, inMode, outMode, renderingIntent=..., proofRenderingIntent=..., flags=16384
|
|
69
|
-
): ...
|
|
70
|
-
|
|
71
|
-
buildTransformFromOpenProfiles = buildTransform
|
|
72
|
-
buildProofTransformFromOpenProfiles = buildProofTransform
|
|
73
|
-
|
|
74
|
-
def applyTransform(im, transform, inPlace: bool = False): ...
|
|
75
|
-
def createProfile(colorSpace, colorTemp: int = -1): ...
|
|
76
|
-
def getProfileName(profile): ...
|
|
77
|
-
def getProfileInfo(profile): ...
|
|
78
|
-
def getProfileCopyright(profile): ...
|
|
79
|
-
def getProfileManufacturer(profile): ...
|
|
80
|
-
def getProfileModel(profile): ...
|
|
81
|
-
def getProfileDescription(profile): ...
|
|
82
|
-
def getDefaultIntent(profile): ...
|
|
83
|
-
def isIntentSupported(profile, intent, direction): ...
|
|
84
|
-
def versions(): ...
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
from typing_extensions import TypeAlias
|
|
2
|
-
|
|
3
|
-
_RGB: TypeAlias = tuple[int, int, int] | tuple[int, int, int, int]
|
|
4
|
-
_Ink: TypeAlias = str | int | _RGB
|
|
5
|
-
_GreyScale: TypeAlias = tuple[int, int]
|
|
6
|
-
|
|
7
|
-
def getrgb(color: _Ink) -> _RGB: ...
|
|
8
|
-
def getcolor(color: _Ink, mode: str) -> _RGB | _GreyScale: ...
|
|
9
|
-
|
|
10
|
-
colormap: dict[str, str]
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
from _typeshed import Incomplete
|
|
2
|
-
from collections.abc import Container, Sequence
|
|
3
|
-
from typing import Any, Literal, overload
|
|
4
|
-
from typing_extensions import TypeAlias
|
|
5
|
-
|
|
6
|
-
from .Image import Image
|
|
7
|
-
from .ImageColor import _Ink
|
|
8
|
-
from .ImageFont import _Font
|
|
9
|
-
|
|
10
|
-
_XY: TypeAlias = Sequence[float | tuple[float, float]]
|
|
11
|
-
_Outline: TypeAlias = Any
|
|
12
|
-
|
|
13
|
-
class ImageDraw:
|
|
14
|
-
font: Incomplete
|
|
15
|
-
palette: Incomplete
|
|
16
|
-
im: Incomplete
|
|
17
|
-
draw: Incomplete
|
|
18
|
-
mode: Incomplete
|
|
19
|
-
ink: Incomplete
|
|
20
|
-
fontmode: str
|
|
21
|
-
fill: bool
|
|
22
|
-
def __init__(self, im: Image, mode: str | None = None) -> None: ...
|
|
23
|
-
def getfont(self): ...
|
|
24
|
-
def arc(self, xy: _XY, start: float, end: float, fill: _Ink | None = None, width: float = 1) -> None: ...
|
|
25
|
-
def bitmap(self, xy: _XY, bitmap: Image, fill: _Ink | None = None) -> None: ...
|
|
26
|
-
def chord(
|
|
27
|
-
self, xy: _XY, start: float, end: float, fill: _Ink | None = None, outline: _Ink | None = None, width: float = 1
|
|
28
|
-
) -> None: ...
|
|
29
|
-
def ellipse(self, xy: _XY, fill: _Ink | None = None, outline: _Ink | None = None, width: float = 1) -> None: ...
|
|
30
|
-
def line(self, xy: _XY, fill: _Ink | None = None, width: float = 0, joint: Literal["curve"] | None = None) -> None: ...
|
|
31
|
-
def shape(self, shape: _Outline, fill: _Ink | None = None, outline: _Ink | None = None) -> None: ...
|
|
32
|
-
def pieslice(
|
|
33
|
-
self,
|
|
34
|
-
xy: tuple[tuple[float, float], tuple[float, float]],
|
|
35
|
-
start: float,
|
|
36
|
-
end: float,
|
|
37
|
-
fill: _Ink | None = None,
|
|
38
|
-
outline: _Ink | None = None,
|
|
39
|
-
width: float = 1,
|
|
40
|
-
) -> None: ...
|
|
41
|
-
def point(self, xy: _XY, fill: _Ink | None = None) -> None: ...
|
|
42
|
-
def polygon(self, xy: _XY, fill: _Ink | None = None, outline: _Ink | None = None, width: float = 1) -> None: ...
|
|
43
|
-
def regular_polygon(
|
|
44
|
-
self,
|
|
45
|
-
bounding_circle: tuple[float, float] | tuple[float, float, float] | list[int],
|
|
46
|
-
n_sides: int,
|
|
47
|
-
rotation: float = 0,
|
|
48
|
-
fill: _Ink | None = None,
|
|
49
|
-
outline: _Ink | None = None,
|
|
50
|
-
width: float = 1,
|
|
51
|
-
) -> None: ...
|
|
52
|
-
def rectangle(
|
|
53
|
-
self,
|
|
54
|
-
xy: tuple[float, float, float, float] | tuple[tuple[float, float], tuple[float, float]],
|
|
55
|
-
fill: _Ink | None = None,
|
|
56
|
-
outline: _Ink | None = None,
|
|
57
|
-
width: float = 1,
|
|
58
|
-
) -> None: ...
|
|
59
|
-
def rounded_rectangle(
|
|
60
|
-
self,
|
|
61
|
-
xy: tuple[float, float, float, float] | tuple[tuple[float, float], tuple[float, float]],
|
|
62
|
-
radius: float = 0,
|
|
63
|
-
fill: _Ink | None = None,
|
|
64
|
-
outline: _Ink | None = None,
|
|
65
|
-
width: float = 1,
|
|
66
|
-
*,
|
|
67
|
-
corners: tuple[bool, bool, bool, bool] | None = None,
|
|
68
|
-
) -> None: ...
|
|
69
|
-
def text(
|
|
70
|
-
self,
|
|
71
|
-
xy: tuple[float, float],
|
|
72
|
-
text: str | bytes,
|
|
73
|
-
fill: _Ink | None = None,
|
|
74
|
-
font: _Font | None = None,
|
|
75
|
-
anchor: str | None = None,
|
|
76
|
-
spacing: float = 4,
|
|
77
|
-
align: Literal["left", "center", "right"] = "left",
|
|
78
|
-
direction: Literal["rtl", "ltr", "ttb"] | None = None,
|
|
79
|
-
features: Sequence[str] | None = None,
|
|
80
|
-
language: str | None = None,
|
|
81
|
-
stroke_width: int = 0,
|
|
82
|
-
stroke_fill: _Ink | None = None,
|
|
83
|
-
embedded_color: bool = False,
|
|
84
|
-
*args,
|
|
85
|
-
**kwargs,
|
|
86
|
-
) -> None: ...
|
|
87
|
-
def multiline_text(
|
|
88
|
-
self,
|
|
89
|
-
xy: tuple[float, float],
|
|
90
|
-
text: str | bytes,
|
|
91
|
-
fill: _Ink | None = None,
|
|
92
|
-
font: _Font | None = None,
|
|
93
|
-
anchor: str | None = None,
|
|
94
|
-
spacing: float = 4,
|
|
95
|
-
align: Literal["left", "center", "right"] = "left",
|
|
96
|
-
direction: Literal["rtl", "ltr", "ttb"] | None = None,
|
|
97
|
-
features: Incomplete | None = None,
|
|
98
|
-
language: str | None = None,
|
|
99
|
-
stroke_width: int = 0,
|
|
100
|
-
stroke_fill: _Ink | None = None,
|
|
101
|
-
embedded_color: bool = False,
|
|
102
|
-
*,
|
|
103
|
-
font_size: int | None = None,
|
|
104
|
-
) -> None: ...
|
|
105
|
-
def textlength(
|
|
106
|
-
self,
|
|
107
|
-
text: str | bytes,
|
|
108
|
-
font: _Font | None = None,
|
|
109
|
-
direction: Literal["rtl", "ltr", "ttb"] | None = None,
|
|
110
|
-
features: Sequence[str] | None = None,
|
|
111
|
-
language: str | None = None,
|
|
112
|
-
embedded_color: bool = False,
|
|
113
|
-
*,
|
|
114
|
-
font_size: int | None = None,
|
|
115
|
-
) -> float: ...
|
|
116
|
-
def textbbox(
|
|
117
|
-
self,
|
|
118
|
-
xy: tuple[float, float],
|
|
119
|
-
text: str | bytes,
|
|
120
|
-
font: _Font | None = None,
|
|
121
|
-
anchor: str | None = None,
|
|
122
|
-
spacing: float = 4,
|
|
123
|
-
align: Literal["left", "center", "right"] = "left",
|
|
124
|
-
direction: Literal["rtl", "ltr", "ttb"] | None = None,
|
|
125
|
-
features: Incomplete | None = None,
|
|
126
|
-
language: str | None = None,
|
|
127
|
-
stroke_width: int = 0,
|
|
128
|
-
embedded_color: bool = False,
|
|
129
|
-
*,
|
|
130
|
-
font_size: int | None = None,
|
|
131
|
-
) -> tuple[int, int, int, int]: ...
|
|
132
|
-
def multiline_textbbox(
|
|
133
|
-
self,
|
|
134
|
-
xy: tuple[float, float],
|
|
135
|
-
text: str | bytes,
|
|
136
|
-
font: _Font | None = None,
|
|
137
|
-
anchor: str | None = None,
|
|
138
|
-
spacing: float = 4,
|
|
139
|
-
align: Literal["left", "center", "right"] = "left",
|
|
140
|
-
direction: Literal["rtl", "ltr", "ttb"] | None = None,
|
|
141
|
-
features: Incomplete | None = None,
|
|
142
|
-
language: str | None = None,
|
|
143
|
-
stroke_width: int = 0,
|
|
144
|
-
embedded_color: bool = False,
|
|
145
|
-
*,
|
|
146
|
-
font_size: int | None = None,
|
|
147
|
-
) -> tuple[int, int, int, int]: ...
|
|
148
|
-
|
|
149
|
-
def Draw(im: Image, mode: str | None = None) -> ImageDraw: ...
|
|
150
|
-
def Outline() -> _Outline: ...
|
|
151
|
-
@overload
|
|
152
|
-
def getdraw(im: None = None, hints: Container[Literal["nicest"]] | None = None) -> tuple[None, Any]: ...
|
|
153
|
-
@overload
|
|
154
|
-
def getdraw(im: Image, hints: Container[Literal["nicest"]] | None = None) -> tuple[Image, Any]: ...
|
|
155
|
-
def floodfill(image: Image, xy: tuple[float, float], value, border=None, thresh: float = 0) -> None: ...
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
from _typeshed import Incomplete
|
|
2
|
-
|
|
3
|
-
from .Image import Image
|
|
4
|
-
from .ImageDraw import ImageDraw
|
|
5
|
-
|
|
6
|
-
class Pen:
|
|
7
|
-
color: Incomplete
|
|
8
|
-
width: Incomplete
|
|
9
|
-
def __init__(self, color, width: int = 1, opacity: int = 255) -> None: ...
|
|
10
|
-
|
|
11
|
-
class Brush:
|
|
12
|
-
color: Incomplete
|
|
13
|
-
def __init__(self, color, opacity: int = 255) -> None: ...
|
|
14
|
-
|
|
15
|
-
class Font:
|
|
16
|
-
color: Incomplete
|
|
17
|
-
font: Incomplete
|
|
18
|
-
def __init__(self, color, file, size: int = 12) -> None: ...
|
|
19
|
-
|
|
20
|
-
class Draw:
|
|
21
|
-
draw: ImageDraw
|
|
22
|
-
image: Image
|
|
23
|
-
transform: Incomplete | None
|
|
24
|
-
def __init__(self, image, size: Incomplete | None = None, color: Incomplete | None = None) -> None: ...
|
|
25
|
-
def flush(self) -> Image: ...
|
|
26
|
-
def render(self, op, xy, pen, brush: Incomplete | None = None) -> None: ...
|
|
27
|
-
def settransform(self, offset) -> None: ...
|
|
28
|
-
def arc(self, xy, start, end, *options) -> None: ...
|
|
29
|
-
def chord(self, xy, start, end, *options) -> None: ...
|
|
30
|
-
def ellipse(self, xy, *options) -> None: ...
|
|
31
|
-
def line(self, xy, *options) -> None: ...
|
|
32
|
-
def pieslice(self, xy, start, end, *options) -> None: ...
|
|
33
|
-
def polygon(self, xy, *options) -> None: ...
|
|
34
|
-
def rectangle(self, xy, *options) -> None: ...
|
|
35
|
-
def text(self, xy, text, font) -> None: ...
|
|
36
|
-
def textbbox(self, xy, text, font): ...
|
|
37
|
-
def textlength(self, text, font): ...
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
from .Image import Image
|
|
2
|
-
|
|
3
|
-
class _Enhance:
|
|
4
|
-
def enhance(self, factor: float) -> Image: ...
|
|
5
|
-
|
|
6
|
-
class Color(_Enhance):
|
|
7
|
-
image: Image
|
|
8
|
-
intermediate_mode: str
|
|
9
|
-
degenerate: Image
|
|
10
|
-
def __init__(self, image: Image) -> None: ...
|
|
11
|
-
|
|
12
|
-
class Contrast(_Enhance):
|
|
13
|
-
image: Image
|
|
14
|
-
degenerate: Image
|
|
15
|
-
def __init__(self, image: Image) -> None: ...
|
|
16
|
-
|
|
17
|
-
class Brightness(_Enhance):
|
|
18
|
-
image: Image
|
|
19
|
-
degenerate: Image
|
|
20
|
-
def __init__(self, image: Image) -> None: ...
|
|
21
|
-
|
|
22
|
-
class Sharpness(_Enhance):
|
|
23
|
-
image: Image
|
|
24
|
-
degenerate: Image
|
|
25
|
-
def __init__(self, image: Image) -> None: ...
|