Skip to content

Commit 51ca4e6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a638382 commit 51ca4e6

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Tests/test_imagedraw.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,9 +1842,7 @@ def test_polygon_dash_empty_raises() -> None:
18421842
draw = ImageDraw.Draw(im)
18431843

18441844
with pytest.raises(ValueError):
1845-
draw.polygon(
1846-
[(10, 10), (90, 10), (90, 90)], outline="blue", dash=()
1847-
)
1845+
draw.polygon([(10, 10), (90, 10), (90, 90)], outline="blue", dash=())
18481846

18491847

18501848
def test_rectangle_dash() -> None:

src/PIL/ImageDraw.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,7 @@ def circle(
231231
ellipse_xy = (xy[0] - radius, xy[1] - radius, xy[0] + radius, xy[1] + radius)
232232
self.ellipse(ellipse_xy, fill, outline, width)
233233

234-
def _normalize_points(
235-
self, xy: Coords
236-
) -> list[tuple[float, float]]:
234+
def _normalize_points(self, xy: Coords) -> list[tuple[float, float]]:
237235
"""Convert various coordinate formats to a list of (x, y) tuples."""
238236
if isinstance(xy[0], (list, tuple)):
239237
return [
@@ -243,8 +241,7 @@ def _normalize_points(
243241
else:
244242
flat = cast(Sequence[float], xy)
245243
return [
246-
(float(flat[i]), float(flat[i + 1]))
247-
for i in range(0, len(flat), 2)
244+
(float(flat[i]), float(flat[i + 1])) for i in range(0, len(flat), 2)
248245
]
249246

250247
def _draw_dashed_line(

0 commit comments

Comments
 (0)