Skip to content

stubtest: enum completeness check #14692

Closed

Description

@srittau

Feature

stubtest could do a completeness check for enums.

Pitch

This would be quite useful for cases like python/typeshed#9727, i.e. if enum values are added in later versions of a library.

Activity

  1. JelleZijlstra commented on Feb 13, 2023

    @JelleZijlstra
    Member

    Note that in the case you linked, the class is not an enum (at least not in the stub). But it would be useful for stubtest to flag missing class attributes whether or not the class is an enum.

  2. hauntsaninja commented on Feb 13, 2023

    @hauntsaninja
    Collaborator

    stubtest does already do this. The issue is just that the typeshed third party stub tests default to passing --ignore-missing-stub
    https://github.com/python/typeshed/blob/70f0f5488aed9952a5bea1d76eef9f97ce60dc40/tests/parse_metadata.py#L70

    I've advocated against typeshed doing this in the past, current issue for this is python/typeshed#9538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions