mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-10-28 06:31:32 +03:00
Correct __getitem__ return type
This commit is contained in:
parent
5122c8356d
commit
e969fa7aea
|
|
@ -15,7 +15,7 @@ def test_sanity() -> None:
|
||||||
|
|
||||||
|
|
||||||
def test_mode() -> 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)
|
im = hopper(mode).resize((32, 30), Image.Resampling.NEAREST)
|
||||||
data = im.getdata()
|
data = im.getdata()
|
||||||
return data[0], len(data), len(list(data))
|
return data[0], len(data), len(list(data))
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
class ImagingCore:
|
class ImagingCore:
|
||||||
def __getitem__(self, index: int) -> float: ...
|
def __getitem__(self, index: int) -> float | tuple[int, ...] | None: ...
|
||||||
def __getattr__(self, name: str) -> Any: ...
|
def __getattr__(self, name: str) -> Any: ...
|
||||||
|
|
||||||
class ImagingFont:
|
class ImagingFont:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user