diff --git a/docs/conf.py b/docs/conf.py index 9974b0f2a..a70dece74 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -233,7 +233,7 @@ htmlhelp_basename = "PillowPILForkdoc" # -- 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'). diff --git a/docs/example/anchors.py b/docs/example/anchors.py index 3a0e40b84..b5d76b4fe 100644 --- a/docs/example/anchors.py +++ b/docs/example/anchors.py @@ -5,7 +5,7 @@ from PIL import Image, ImageDraw, ImageFont 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") diff --git a/selftest.py b/selftest.py index 600fd6496..ed5252c44 100755 --- a/selftest.py +++ b/selftest.py @@ -15,7 +15,7 @@ except AttributeError: pass -def testimage(): +def testimage() -> None: """ PIL lets you create in-memory images with various pixel types: