8000 Group should be typed as Generic · Issue #2722 · pygame/pygame · GitHub
[go: up one dir, main page]

Skip to content
Group should be typed as Generic #2722
@vnmabus

Description

@vnmabus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtypesType hint checking related tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0