Correct __getitem__ return type

This commit is contained in:
Andrew Murray 2025-10-17 06:14:02 +11:00
parent 5122c8356d
commit e969fa7aea
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ def test_sanity() -> None:
def test_mode() -> None:
def getdata(mode: str) -> tuple[float | tuple[int, ...], int, int]:
def getdata(mode: str) -> tuple[float | tuple[int, ...] | None, int, int]:
im = hopper(mode).resize((32, 30), Image.Resampling.NEAREST)
data = im.getdata()
return data[0], len(data), len(list(data))

View File

@ -1,7 +1,7 @@
from typing import Any
class ImagingCore:
def __getitem__(self, index: int) -> float: ...
def __getitem__(self, index: int) -> float | tuple[int, ...] | None: ...
def __getattr__(self, name: str) -> Any: ...
class ImagingFont: