mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-07 22:04:46 +03:00
Document type hint
This commit is contained in:
parent
5cc4170da3
commit
37505a81f5
|
@ -9,6 +9,13 @@ used to represent a PIL image. The module also provides a number of factory
|
||||||
functions, including functions to load images from files, and to create new
|
functions, including functions to load images from files, and to create new
|
||||||
images.
|
images.
|
||||||
|
|
||||||
|
To assist with type hints, ``ImageType`` has been added a simpler way to refer
|
||||||
|
to the class within the module. ::
|
||||||
|
|
||||||
|
from PIL import Image, ImageType
|
||||||
|
im1: Image.Image = Image.new("RGB", (1, 1))
|
||||||
|
im2: ImageType = Image.new("RGB", (1, 1))
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user