From 37505a81f5c75d20694e1e25436149e13153b117 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 27 Dec 2023 10:00:04 +1100 Subject: [PATCH] Document type hint --- docs/reference/Image.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst index 4281b182c..1df9f10fd 100644 --- a/docs/reference/Image.rst +++ b/docs/reference/Image.rst @@ -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 --------