Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated test type hint #8482

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Updated test type hint #8482

merged 1 commit into from
Oct 18, 2024

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
45 of 46 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants