Skip to content

Update ImageDraw signatures in docs - #10065

Merged
radarhere merged 1 commit into
python-pillow:mainfrom
ZainnQureshii:docs-imagedraw-signatures
Sep 27, 2026
Merged

radarhere merged 1 commit into
python-pillow:mainfrom
ZainnQureshii:docs-imagedraw-signatures

Conversation

@ZainnQureshii

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request:

  • docs/reference/ImageDraw.rst: ImageDraw.arc(..., width=0) -> width=1, matching src/PIL/ImageDraw.py (arc(..., width: int = 1)). Since Do not draw line or arc if width is zero #9589, width=0 draws nothing, so copying the documented default suppresses the arc.
  • ImageDraw.line(xy, fill=None, width=0, joint=None) -> width=1, matching line(..., width: int = 1, ...), same reason.
  • getdraw(im=None, hints=None) -> getdraw(im=None), and the :param hints: line removed. hints was deprecated in Deprecate ImageDraw.getdraw hints parameter #8124 and removed in 12.0.0 (docs/releasenotes/12.0.0.rst); getdraw() now only accepts im, so passing hints raises TypeError.

Docs-only. Note: open #9490 also edits the line() signature line (adds dash), so whichever lands second has a one-line conflict.


Prepared with AI assistance (Claude Code) and reviewed with GitHub Copilot.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@radarhere radarhere changed the title Fix stale ImageDraw signatures in docs Update ImageDraw signatures in docs Sep 27, 2026
@radarhere
radarhere merged commit 6c88676 into python-pillow:main Sep 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants