Skip to content

Commit d577e0a

Browse files
committed
Use coordinate type for xy arguments
1 parent 79a30ee commit d577e0a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

stubs/Pillow/PIL/PyAccess.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ class PyAccess:
1010
image32: Any
1111
image: Any
1212
def __init__(self, img, readonly: bool = ...) -> None: ...
13-
def __setitem__(self, xy, color) -> None: ...
14-
def __getitem__(self, xy) -> Any: ...
15-
def putpixel(self, xy, color) -> None: ...
16-
def getpixel(self, xy) -> Any: ...
17-
def check_xy(self, xy): ...
13+
def __setitem__(self, xy: tuple[int, int], color) -> None: ...
14+
def __getitem__(self, xy: tuple[int, int]) -> Any: ...
15+
def putpixel(self, xy: tuple[int, int], color) -> None: ...
16+
def getpixel(self, xy: tuple[int, int]) -> Any: ...
17+
def check_xy(self, xy: tuple[int, int]): ...
1818

1919
class _PyAccess32_2(PyAccess):
2020
def get_pixel(self, x, y): ...

stubs/Pillow/PIL/_imaging.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ class _PixelAccess:
1616
# The name is prefixed here with an underscore as PixelAccess is not
1717
# runtime-importable.
1818

19-
def __setitem__(self, xy, color) -> None: ...
20-
def __getitem__(self, xy) -> Any: ...
21-
def putpixel(self, xy, color) -> None: ...
22-
def getpixel(self, xy) -> Any: ...
19+
def __setitem__(self, xy: tuple[int, int], color) -> None: ...
20+
def __getitem__(self, xy: tuple[int, int]) -> Any: ...
21+
def putpixel(self, xy: tuple[int, int], color) -> None: ...
22+
def getpixel(self, xy: tuple[int, int]) -> Any: ...
2323

2424
class _Path:
2525
def __getattr__(self, item: str) -> Incomplete: ...

0 commit comments

Comments
 (0)