diff --git a/stubs/Pillow/PIL/PyAccess.pyi b/stubs/Pillow/PIL/PyAccess.pyi index 3d9231274c76..d6c4b98c03c3 100644 --- a/stubs/Pillow/PIL/PyAccess.pyi +++ b/stubs/Pillow/PIL/PyAccess.pyi @@ -11,9 +11,9 @@ class PyAccess: image: Any def __init__(self, img, readonly: bool = ...) -> None: ... def __setitem__(self, xy, color) -> None: ... - def __getitem__(self, xy): ... - putpixel: Any - getpixel: Any + def __getitem__(self, xy) -> Any: ... + def putpixel(self, xy, color) -> None: ... + def getpixel(self, xy) -> Any: ... def check_xy(self, xy): ... class _PyAccess32_2(PyAccess): diff --git a/stubs/Pillow/PIL/_imaging.pyi b/stubs/Pillow/PIL/_imaging.pyi index b9873df6e407..a2d16c491236 100644 --- a/stubs/Pillow/PIL/_imaging.pyi +++ b/stubs/Pillow/PIL/_imaging.pyi @@ -1,5 +1,6 @@ from _typeshed import Incomplete from collections.abc import Sequence +from typing import Any from typing_extensions import Literal DEFAULT_STRATEGY: Literal[0] @@ -14,7 +15,11 @@ class _PixelAccess: # https://github.com/python-pillow/Pillow/blob/main/docs/reference/PixelAccess.rst # The name is prefixed here with an underscore as PixelAccess is not # runtime-importable. - def __getattr__(self, item: str) -> Incomplete: ... + + def __setitem__(self, xy, color) -> None: ... + def __getitem__(self, xy) -> Any: ... + def putpixel(self, xy, color) -> None: ... + def getpixel(self, xy) -> Any: ... class _Path: def __getattr__(self, item: str) -> Incomplete: ...