mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-07 22:04:46 +03:00
Updated type hint
This commit is contained in:
parent
dc78fd7de0
commit
5cc4170da3
|
@ -1,11 +1,11 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont, ImageType
|
||||||
|
|
||||||
font = ImageFont.truetype("Tests/fonts/NotoSans-Regular.ttf", 16)
|
font = ImageFont.truetype("Tests/fonts/NotoSans-Regular.ttf", 16)
|
||||||
|
|
||||||
|
|
||||||
def test(anchor: str) -> Image.Image:
|
def test(anchor: str) -> ImageType:
|
||||||
im = Image.new("RGBA", (200, 100), "white")
|
im = Image.new("RGBA", (200, 100), "white")
|
||||||
d = ImageDraw.Draw(im)
|
d = ImageDraw.Draw(im)
|
||||||
d.line(((100, 0), (100, 100)), "gray")
|
d.line(((100, 0), (100, 100)), "gray")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user