Use a property

Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
This commit is contained in:
Adam J. Stewart 2024-04-16 17:53:48 +02:00 committed by GitHub
parent 84238bd459
commit c655dc0c6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3079,7 +3079,9 @@ class SupportsArrayInterface(Protocol):
An object that has an ``__array_interface__`` dictionary.
"""
__array_interface__: dict[str, Any]
@property
def __array_interface__(self) -> dict[str, Any]:
raise NotImplementedError()
def fromarray(obj: SupportsArrayInterface, mode: str | None = None) -> Image: