Skip to content

Commit d4fd049

Browse files
authored
Merge pull request #7640 from radarhere/type_hints
Added type hints to selftest.py, docs/conf.py and docs/example/anchors.py
2 parents ef0b0d2 + bc5ec22 commit d4fd049

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233

234234
# -- Options for LaTeX output ---------------------------------------------
235235

236-
latex_elements = {
236+
latex_elements: dict[str, str] = {
237237
# The paper size ('letterpaper' or 'a4paper').
238238
# 'papersize': 'letterpaper',
239239
# The font size ('10pt', '11pt' or '12pt').

Diff for: docs/example/anchors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
font = ImageFont.truetype("Tests/fonts/NotoSans-Regular.ttf", 16)
66

77

8-
def test(anchor):
8+
def test(anchor: str) -> Image.Image:
99
im = Image.new("RGBA", (200, 100), "white")
1010
d = ImageDraw.Draw(im)
1111
d.line(((100, 0), (100, 100)), "gray")

Diff for: selftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
pass
1616

1717

18-
def testimage():
18+
def testimage() -> None:
1919
"""
2020
PIL lets you create in-memory images with various pixel types:
2121

0 commit comments

Comments
 (0)