Skip to content

Commit

Permalink
Merge pull request #7640 from radarhere/type_hints
Browse files Browse the repository at this point in the history
Added type hints to selftest.py, docs/conf.py and docs/example/anchors.py
  • Loading branch information
radarhere committed Dec 26, 2023
2 parents ef0b0d2 + bc5ec22 commit d4fd049
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
latex_elements: dict[str, str] = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
Expand Down
2 changes: 1 addition & 1 deletion docs/example/anchors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
font = ImageFont.truetype("Tests/fonts/NotoSans-Regular.ttf", 16)


def test(anchor):
def test(anchor: str) -> Image.Image:
im = Image.new("RGBA", (200, 100), "white")
d = ImageDraw.Draw(im)
d.line(((100, 0), (100, 100)), "gray")
Expand Down
2 changes: 1 addition & 1 deletion selftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
pass


def testimage():
def testimage() -> None:
"""
PIL lets you create in-memory images with various pixel types:
Expand Down

0 comments on commit d4fd049

Please sign in to comment.