diff --git a/stubs/Pillow/METADATA.toml b/stubs/Pillow/METADATA.toml index 549fe9f6e..a6930073a 100644 --- a/stubs/Pillow/METADATA.toml +++ b/stubs/Pillow/METADATA.toml @@ -1 +1 @@ -version = "9.0.*" +version = "9.2.*" diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index d7e35171e..d892d2187 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -98,7 +98,7 @@ def init() -> None: ... def coerce_e(value) -> _E: ... class _E: - def __init__(self, data) -> None: ... + def __init__(self, scale, data) -> None: ... def __add__(self, other) -> _E: ... def __mul__(self, other) -> _E: ... @@ -125,7 +125,6 @@ class Image: def __exit__(self, *args: object) -> None: ... def close(self) -> None: ... def __eq__(self, other: object) -> bool: ... - def __array__(self, dtype=...) -> Any: ... # returns numpy.array() def __getstate__(self) -> _ImageState: ... def __setstate__(self, state: _ImageState) -> None: ... def tobytes(self, encoder_name: str = ..., *args) -> bytes: ... @@ -161,7 +160,7 @@ class Image: def getextrema(self): ... def getexif(self) -> Exif: ... def getim(self): ... - def getpalette(self) -> list[int] | None: ... + def getpalette(self, rawmode: str | None = ...) -> list[int] | None: ... def getpixel(self, xy: tuple[int, int]): ... def getprojection(self) -> tuple[list[int], list[int]]: ... def histogram(self, mask: Image | None = ..., extrema: tuple[int, int] | tuple[float, float] | None = ...) -> list[int]: ... diff --git a/stubs/Pillow/PIL/ImageMath.pyi b/stubs/Pillow/PIL/ImageMath.pyi index de95a29fe..1dc14d743 100644 --- a/stubs/Pillow/PIL/ImageMath.pyi +++ b/stubs/Pillow/PIL/ImageMath.pyi @@ -1,7 +1,5 @@ from typing import Any -VERBOSE: int - class _Operand: im: Any def __init__(self, im) -> None: ... diff --git a/stubs/Pillow/PIL/ImageMode.pyi b/stubs/Pillow/PIL/ImageMode.pyi index 0716dea04..de5a9ab43 100644 --- a/stubs/Pillow/PIL/ImageMode.pyi +++ b/stubs/Pillow/PIL/ImageMode.pyi @@ -5,6 +5,6 @@ class ModeDescriptor: bands: Any basemode: Any basetype: Any - def __init__(self, mode, bands, basemode, basetype) -> None: ... + def __init__(self, mode, bands, basemode, basetype, typestr) -> None: ... def getmode(mode): ... diff --git a/stubs/Pillow/PIL/ImageShow.pyi b/stubs/Pillow/PIL/ImageShow.pyi index 917de83d7..67b73309d 100644 --- a/stubs/Pillow/PIL/ImageShow.pyi +++ b/stubs/Pillow/PIL/ImageShow.pyi @@ -1,3 +1,4 @@ +from _typeshed import Incomplete from typing import Any from typing_extensions import Literal @@ -12,7 +13,7 @@ class Viewer: def get_command(self, file, **options) -> None: ... def save_image(self, image): ... def show_image(self, image, **options): ... - def show_file(self, file, **options): ... + def show_file(self, path: Incomplete | None = ..., **options): ... class WindowsViewer(Viewer): format: str @@ -23,13 +24,13 @@ class MacViewer(Viewer): format: str options: Any def get_command(self, file, **options): ... - def show_file(self, file, **options): ... + def show_file(self, path: Incomplete | None = ..., **options): ... class UnixViewer(Viewer): format: str options: Any def get_command(self, file, **options): ... - def show_file(self, file, **options): ... + def show_file(self, path: Incomplete | None = ..., **options): ... class XDGViewer(UnixViewer): def get_command_ex(self, file, **options) -> tuple[Literal["xdg-open"], Literal["xdg-open"]]: ... diff --git a/stubs/Pillow/PIL/_util.pyi b/stubs/Pillow/PIL/_util.pyi index f5faa8c8f..e69de29bb 100644 --- a/stubs/Pillow/PIL/_util.pyi +++ b/stubs/Pillow/PIL/_util.pyi @@ -1,9 +0,0 @@ -from typing import NoReturn - -def isPath(f: object) -> bool: ... -def isDirectory(f: object) -> bool: ... - -class deferred_error: - ex: BaseException - def __init__(self, ex: BaseException) -> None: ... - def __getattr__(self, elt: str) -> NoReturn: ...