Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Tests/test_imagedraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ def test_shape1() -> None:
x3, y3 = 95, 5

# Act
assert ImageDraw.Outline is not None
s = ImageDraw.Outline()
s.move(x0, y0)
s.curve(x1, y1, x2, y2, x3, y3)
Expand All @@ -470,7 +469,6 @@ def test_shape2() -> None:
x3, y3 = 5, 95

# Act
assert ImageDraw.Outline is not None
s = ImageDraw.Outline()
s.move(x0, y0)
s.curve(x1, y1, x2, y2, x3, y3)
Expand All @@ -489,7 +487,6 @@ def test_transform() -> None:
draw = ImageDraw.Draw(im)

# Act
assert ImageDraw.Outline is not None
s = ImageDraw.Outline()
s.line(0, 0)
s.transform((0, 0, 0, 0, 0, 0))
Expand Down Expand Up @@ -1526,7 +1523,6 @@ def test_same_color_outline(bbox: Coords) -> None:
x2, y2 = 95, 50
x3, y3 = 95, 5

assert ImageDraw.Outline is not None
s = ImageDraw.Outline()
s.move(x0, y0)
s.curve(x1, y1, x2, y2, x3, y3)
Expand Down
6 changes: 1 addition & 5 deletions src/PIL/ImageDraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@
from ._typing import Coords

# experimental access to the outline API
Outline: Callable[[], Image.core._Outline] | None
try:
Outline = Image.core.outline
except AttributeError:
Outline = None
Outline: Callable[[], Image.core._Outline] = Image.core.outline

if TYPE_CHECKING:
from . import ImageDraw2, ImageFont
Expand Down
Loading