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

Group should be typed as Generic (2722) #1402

Closed
GalacticEmperor1 opened this issue Feb 12, 2023 · 0 comments
Closed

Group should be typed as Generic (2722) #1402

GalacticEmperor1 opened this issue Feb 12, 2023 · 0 comments
Labels
enhancement type hints Type hint checking related tasks

Comments

@GalacticEmperor1
Copy link
Collaborator

Issue №2722 opened by vnmabus at 2021-09-17 01:29:02

Description

Pygame Group objects should probably be typed as a Generic. This would allow creating a Group of a particular subclass of Sprite without using assert everywhere to check the types.

In order to keep Mypy happy in the common case in which you create a Group without specifying a type (meaning generic Sprite), something like python/mypy#4236 (comment) can be used.


Comments

@GalacticEmperor1 GalacticEmperor1 added enhancement type hints Type hint checking related tasks labels Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type hints Type hint checking related tasks
Projects
None yet
Development

No branches or pull requests

1 participant