Skip to content

Use namedtuple for pygame.image.load_animation #3442

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

damusss
Copy link
Member

@damusss damusss commented May 24, 2025

As requested in the pygame discord server, I made load_animation return a list of namedtuples so frame.surface and frame.delay are possible. The typehinting ensures proper types for both attribute access and item access.

@damusss damusss requested a review from ankith26 May 24, 2025 12:03
@damusss damusss requested a review from a team as a code owner May 24, 2025 12:03
@damusss damusss added enhancement image pygame.image labels May 24, 2025
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR 🎉

@damusss damusss requested review from Starbuck5 and removed request for Starbuck5 May 25, 2025 11:00
@damusss
Copy link
Member Author

damusss commented May 25, 2025

This PR should wait for Starbuck's opinion before merging

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.

4 participants