mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Depend on Pillow instead of types-Pillow (#11720)
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
version = "0.33.*"
|
||||
upstream_repository = "https://github.com/python-xlib/python-xlib"
|
||||
requires = ["types-Pillow"]
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
from collections.abc import Iterable, Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from PIL import Image
|
||||
from Xlib._typing import ErrorHandler
|
||||
from Xlib.protocol import request, rq
|
||||
from Xlib.protocol.structs import _Arc6IntSequence, _Rectangle4IntSequence, _RGB3IntIterable, _Segment4IntSequence
|
||||
from Xlib.xobject import colormap, cursor, fontable, resource
|
||||
|
||||
_Image: TypeAlias = Any # PIL.Image.Image
|
||||
|
||||
class Drawable(resource.Resource):
|
||||
__drawable__ = resource.Resource.__resource__
|
||||
def get_geometry(self) -> request.GetGeometry: ...
|
||||
@@ -100,7 +102,7 @@ class Drawable(resource.Resource):
|
||||
data: bytes | bytearray,
|
||||
onerror: ErrorHandler[object] | None = None,
|
||||
) -> None: ...
|
||||
def put_pil_image(self, gc: int, x: int, y: int, image: Image.Image, onerror: ErrorHandler[object] | None = None) -> None: ...
|
||||
def put_pil_image(self, gc: int, x: int, y: int, image: _Image, onerror: ErrorHandler[object] | None = None) -> None: ...
|
||||
def get_image(self, x: int, y: int, width: int, height: int, format: int, plane_mask: int) -> request.GetImage: ...
|
||||
def draw_text(
|
||||
self, gc: int, x: int, y: int, text: dict[str, str | int], onerror: ErrorHandler[object] | None = None
|
||||
|
||||
Reference in New Issue
Block a user