Skip to content

Conversation

@radarhere
Copy link
Member

Minor type hint update. In the following fixture, the return type can be the more specific ImageFile, rather than just Image. The current version was written before #7944 updated the return type of Image.open to ImageFile.

@pytest.fixture
def gradients_image() -> Generator[Image.Image, None, None]:
with Image.open("Tests/images/radial_gradients.png") as im:
im.load()
try:
yield im
finally:
im.close()

@hugovk hugovk merged commit 331e4e7 into python-pillow:main Oct 18, 2024
@radarhere radarhere deleted the imagefile branch October 18, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants