Try type comment

This commit is contained in:
Adam J. Stewart 2024-04-02 17:53:11 +02:00
parent 8e47a6f2c8
commit 37ed8c337d
No known key found for this signature in database
GPG Key ID: C66C0675661156FC

View File

@ -41,7 +41,7 @@ import warnings
from collections.abc import Callable, MutableMapping from collections.abc import Callable, MutableMapping
from enum import IntEnum from enum import IntEnum
from types import ModuleType from types import ModuleType
from typing import IO, TYPE_CHECKING, Any from typing import IO, Optional, TYPE_CHECKING, Any
# VERSION was removed in Pillow 6.0.0. # VERSION was removed in Pillow 6.0.0.
# PILLOW_VERSION was removed in Pillow 9.0.0. # PILLOW_VERSION was removed in Pillow 9.0.0.
@ -3069,7 +3069,10 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):
return frombytes(mode, size, data, decoder_name, args) return frombytes(mode, size, data, decoder_name, args)
def fromarray(obj: numpy.typing.ArrayLike, mode: Optional[str] = None) -> Image: def fromarray(
obj, # type: numpy.typing.ArrayLike
mode: Optional[str] = None
) -> Image:
""" """
Creates an image memory from an object exporting the array interface Creates an image memory from an object exporting the array interface
(using the buffer protocol):: (using the buffer protocol)::