mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +08:00
Upgrade stubs to Pillow 9 (#6795)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1 +1 @@
|
||||
version = "8.3.*"
|
||||
version = "9.0.*"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile, PyDecoder
|
||||
|
||||
@@ -18,8 +19,8 @@ def decode_dxt5(data): ...
|
||||
class BLPFormatError(NotImplementedError): ...
|
||||
|
||||
class BlpImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["BLP"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
class _BLPBaseDecoder(PyDecoder):
|
||||
magic: Any
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
BIT2MODE: Any
|
||||
|
||||
class BmpImageFile(ImageFile):
|
||||
format_description: str
|
||||
format: str
|
||||
format_description: ClassVar[str]
|
||||
format: ClassVar[Literal["BMP", "DIB", "CUR"]]
|
||||
COMPRESSIONS: Any
|
||||
|
||||
class DibImageFile(BmpImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["DIB"]]
|
||||
|
||||
SAVE: Any
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class BufrStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["BUFR"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .BmpImagePlugin import BmpImageFile
|
||||
|
||||
class CurImageFile(BmpImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["CUR"]]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .PcxImagePlugin import PcxImageFile
|
||||
|
||||
MAGIC: int
|
||||
|
||||
class DcxImageFile(PcxImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["DCX"]]
|
||||
frame: Any
|
||||
fp: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
@@ -65,6 +66,6 @@ DXGI_FORMAT_BC7_UNORM: int
|
||||
DXGI_FORMAT_BC7_UNORM_SRGB: int
|
||||
|
||||
class DdsImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["DDS"]]
|
||||
format_description: ClassVar[str]
|
||||
def load_seek(self, pos) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -7,7 +8,7 @@ field: Any
|
||||
gs_windows_binary: Any
|
||||
|
||||
def has_ghostscript(): ...
|
||||
def Ghostscript(tile, size, fp, scale: int = ...): ...
|
||||
def Ghostscript(tile, size, fp, scale: int = ..., transparency: bool = ...): ...
|
||||
|
||||
class PSFile:
|
||||
fp: Any
|
||||
@@ -17,11 +18,11 @@ class PSFile:
|
||||
def readline(self): ...
|
||||
|
||||
class EpsImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["EPS"]]
|
||||
format_description: ClassVar[str]
|
||||
mode_map: Any
|
||||
im: Any
|
||||
mode: Any
|
||||
tile: Any
|
||||
def load(self, scale: int = ...) -> None: ...
|
||||
def load(self, scale: int = ..., transparency: bool = ...) -> None: ...
|
||||
def load_seek(self, *args, **kwargs) -> None: ...
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class FITSStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["FITS"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class FliImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["FLI"]]
|
||||
format_description: ClassVar[str]
|
||||
def seek(self, frame) -> None: ...
|
||||
def tell(self): ...
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MODES: Any
|
||||
|
||||
class FpxImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["FPX"]]
|
||||
format_description: ClassVar[str]
|
||||
fp: Any
|
||||
def load(self): ...
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MAGIC: bytes
|
||||
@@ -5,6 +8,6 @@ FORMAT_DXT1: int
|
||||
FORMAT_UNCOMPRESSED: int
|
||||
|
||||
class FtexImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["FTEX"]]
|
||||
format_description: ClassVar[str]
|
||||
def load_seek(self, pos) -> None: ...
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class GbrImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["GBR"]]
|
||||
format_description: ClassVar[str]
|
||||
im: Any
|
||||
def load(self) -> None: ...
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class GdImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["GD"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
def open(fp, mode: str = ...): ...
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class GifImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["GIF"]]
|
||||
format_description: ClassVar[str]
|
||||
global_palette: Any
|
||||
def data(self): ...
|
||||
@property
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class GribStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["GRIB"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
def register_handler(handler) -> None: ...
|
||||
|
||||
class HDF5StubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["HDF5"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -22,8 +23,8 @@ class IcnsFile:
|
||||
def getimage(self, size: Any | None = ...): ...
|
||||
|
||||
class IcnsImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["ICNS"]]
|
||||
format_description: ClassVar[str]
|
||||
@property
|
||||
def size(self): ...
|
||||
@size.setter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -13,8 +14,8 @@ class IcoFile:
|
||||
def frame(self, idx): ...
|
||||
|
||||
class IcoImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["ICO"]]
|
||||
format_description: ClassVar[str]
|
||||
@property
|
||||
def size(self): ...
|
||||
@size.setter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -18,8 +19,8 @@ split: Any
|
||||
def number(s): ...
|
||||
|
||||
class ImImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["IM"]]
|
||||
format_description: ClassVar[str]
|
||||
@property
|
||||
def n_frames(self): ...
|
||||
@property
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import SupportsRead, SupportsWrite
|
||||
from collections.abc import Iterable, Iterator, MutableMapping
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, Protocol, Sequence, SupportsBytes, Union
|
||||
from typing import Any, Callable, ClassVar, Protocol, Sequence, SupportsBytes, Union
|
||||
from typing_extensions import Literal
|
||||
|
||||
from ._imaging import (
|
||||
@@ -102,8 +102,8 @@ class _E:
|
||||
_ImageState = tuple[dict[str, Any], str, tuple[int, int], Any, bytes]
|
||||
|
||||
class Image:
|
||||
format: Any
|
||||
format_description: Any
|
||||
format: ClassVar[str | None]
|
||||
format_description: ClassVar[str | None]
|
||||
im: Any
|
||||
mode: str
|
||||
palette: Any
|
||||
@@ -196,7 +196,7 @@ class Image:
|
||||
**params: Any,
|
||||
) -> None: ...
|
||||
def seek(self, frame: int) -> None: ...
|
||||
def show(self, title: str | None = ..., command: str | None = ...) -> None: ...
|
||||
def show(self, title: str | None = ...) -> None: ...
|
||||
def split(self) -> tuple[Image, ...]: ...
|
||||
def getchannel(self, channel: int | str) -> Image: ...
|
||||
def tell(self) -> int: ...
|
||||
|
||||
@@ -30,7 +30,7 @@ class ImageDraw:
|
||||
width: float = ...,
|
||||
) -> None: ...
|
||||
def point(self, xy: _XY, fill: _Ink | None = ...) -> None: ...
|
||||
def polygon(self, xy: _XY, fill: _Ink | None = ..., outline: _Ink | None = ...) -> None: ...
|
||||
def polygon(self, xy: _XY, fill: _Ink | None = ..., outline: _Ink | None = ..., width: float = ...) -> None: ...
|
||||
def regular_polygon(
|
||||
self,
|
||||
bounding_circle: tuple[float, float] | tuple[float, float, float] | list[int],
|
||||
|
||||
@@ -10,7 +10,6 @@ LOAD_TRUNCATED_IMAGES: bool
|
||||
ERRORS: Any
|
||||
|
||||
def raise_oserror(error) -> NoReturn: ...
|
||||
def raise_ioerror(error) -> NoReturn: ...
|
||||
|
||||
class ImageFile(Image):
|
||||
custom_mimetype: Any
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
def register(viewer, order: int = ...) -> None: ...
|
||||
def show(image, title: Any | None = ..., **options): ...
|
||||
@@ -30,8 +31,11 @@ class UnixViewer(Viewer):
|
||||
def get_command(self, file, **options): ...
|
||||
def show_file(self, file, **options): ...
|
||||
|
||||
class XDGViewer(UnixViewer):
|
||||
def get_command_ex(self, file, **options) -> tuple[Literal["xdg-open"], Literal["xdg-open"]]: ...
|
||||
|
||||
class DisplayViewer(UnixViewer):
|
||||
def get_command_ex(self, file, **options): ...
|
||||
def get_command_ex(self, file, title: str | None = ..., **options): ...
|
||||
|
||||
class GmDisplayViewer(UnixViewer):
|
||||
def get_command_ex(self, file, **options): ...
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
field: Any
|
||||
|
||||
class ImtImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["IMT"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -9,8 +10,8 @@ def i(c): ...
|
||||
def dump(c) -> None: ...
|
||||
|
||||
class IptcImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["IPTC"]]
|
||||
format_description: ClassVar[str]
|
||||
def getint(self, key): ...
|
||||
def field(self): ...
|
||||
im: Any
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class Jpeg2KImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["JPEG2000"]]
|
||||
format_description: ClassVar[str]
|
||||
reduce: Any
|
||||
tile: Any
|
||||
def load(self): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -11,8 +12,8 @@ def DQT(self, marker) -> None: ...
|
||||
MARKER: Any
|
||||
|
||||
class JpegImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["JPEG", "MPO"]]
|
||||
format_description: ClassVar[str]
|
||||
def load_read(self, read_bytes): ...
|
||||
mode: Any
|
||||
tile: Any
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class McIdasImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["MCIDAS"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .TiffImagePlugin import TiffImageFile
|
||||
|
||||
class MicImageFile(TiffImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["MIC"]]
|
||||
fp: Any
|
||||
frame: Any
|
||||
def seek(self, frame) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -13,5 +14,5 @@ class BitStream:
|
||||
def read(self, bits): ...
|
||||
|
||||
class MpegImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["MPEG"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .JpegImagePlugin import JpegImageFile
|
||||
|
||||
class MpoImageFile(JpegImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["MPO"]]
|
||||
def load_seek(self, pos) -> None: ...
|
||||
fp: Any
|
||||
offset: Any
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile, PyDecoder
|
||||
|
||||
class MspImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["MSP"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
class MspDecoder(PyDecoder):
|
||||
def decode(self, buffer): ...
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class PcdImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["PCD"]]
|
||||
format_description: ClassVar[str]
|
||||
im: Any
|
||||
def load_end(self) -> None: ...
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
logger: Any
|
||||
|
||||
class PcxImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["PCX", "DCX"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
SAVE: Any
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class PixarImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["PIXAR"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from ._binary import o8 as o8
|
||||
from .ImageFile import ImageFile
|
||||
@@ -75,8 +76,8 @@ class PngStream(ChunkStream):
|
||||
def chunk_fdAT(self, pos, length): ...
|
||||
|
||||
class PngImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["PNG"]]
|
||||
format_description: ClassVar[str]
|
||||
@property
|
||||
def text(self): ...
|
||||
fp: Any
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -6,5 +7,5 @@ b_whitespace: bytes
|
||||
MODES: Any
|
||||
|
||||
class PpmImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["PPM"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MODES: Any
|
||||
|
||||
class PsdImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["PSD"]]
|
||||
format_description: ClassVar[str]
|
||||
mode: Any
|
||||
tile: Any
|
||||
frame: Any
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile, PyDecoder
|
||||
|
||||
MODES: Any
|
||||
|
||||
class SgiImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["SGI"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
class SGI16Decoder(PyDecoder):
|
||||
def decode(self, buffer): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
@@ -11,8 +11,8 @@ def isSpiderHeader(t): ...
|
||||
def isSpiderImage(filename): ...
|
||||
|
||||
class SpiderImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["SPIDER"]]
|
||||
format_description: ClassVar[str]
|
||||
@property
|
||||
def n_frames(self): ...
|
||||
@property
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
class SunImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["SUN"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
MODES: Any
|
||||
|
||||
class TgaImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["TGA"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
SAVE: Any
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from collections.abc import MutableMapping
|
||||
from numbers import Rational
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
@@ -136,8 +137,8 @@ class ImageFileDirectory_v1(ImageFileDirectory_v2):
|
||||
ImageFileDirectory = ImageFileDirectory_v1
|
||||
|
||||
class TiffImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["TIFF", "MIC"]]
|
||||
format_description: ClassVar[str]
|
||||
tag_v2: Any
|
||||
tag: Any
|
||||
def __init__(self, fp: Any | None = ..., filename: Any | None = ...) -> None: ...
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from . import ImageFile
|
||||
|
||||
class WalImageFile(ImageFile.ImageFile):
|
||||
format: ClassVar[Literal["WAL"]]
|
||||
format_description: ClassVar[str]
|
||||
def load(self) -> None: ...
|
||||
|
||||
def open(filename): ...
|
||||
|
||||
quake2palette: bytes
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
SUPPORTED: bool
|
||||
|
||||
class WebPImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["WEBP"]]
|
||||
format_description: ClassVar[str]
|
||||
def seek(self, frame) -> None: ...
|
||||
fp: Any
|
||||
tile: Any
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import StubImageFile
|
||||
|
||||
@@ -10,6 +11,6 @@ class WmfHandler:
|
||||
def load(self, im): ...
|
||||
|
||||
class WmfStubImageFile(StubImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["WMF"]]
|
||||
format_description: ClassVar[str]
|
||||
def load(self, dpi: Any | None = ...) -> None: ...
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
PALETTE: bytes
|
||||
|
||||
class XVThumbImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["XVThumb"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
xbm_head: Any
|
||||
|
||||
class XbmImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["XBM"]]
|
||||
format_description: ClassVar[str]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .ImageFile import ImageFile
|
||||
|
||||
xpm_head: Any
|
||||
|
||||
class XpmImageFile(ImageFile):
|
||||
format: str
|
||||
format_description: str
|
||||
format: ClassVar[Literal["XPM"]]
|
||||
format_description: ClassVar[str]
|
||||
def load_read(self, bytes): ...
|
||||
|
||||
Reference in New Issue
Block a user