Skip to content

Conversation

radarhere
Copy link
Member

I suggest removing this unused function

Pillow/src/PIL/Image.py

Lines 1339 to 1343 in d42e537

def _expand(self, xmargin: int, ymargin: int | None = None) -> Image:
if ymargin is None:
ymargin = xmargin
self.load()
return self._new(self.im.expand(xmargin, ymargin))

The C expand method is still used elsewhere.

@radarhere radarhere changed the title Removed Image _expand() Remove Image _expand() Sep 29, 2025
@hugovk hugovk changed the title Remove Image _expand() Remove unused Image _expand() Sep 30, 2025
@hugovk hugovk merged commit 6b10d4c into python-pillow:main Sep 30, 2025
51 checks passed
@radarhere radarhere deleted the _expand branch September 30, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants