Skip to content

Commit

Permalink
Document type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 26, 2023
1 parent 5cc4170 commit 37505a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/reference/Image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
--------

Expand Down

0 comments on commit 37505a8

Please sign in to comment.