Skip to content

pre-release v0.920 incorrectly identifies enum as final #11578

@terencehonles

Description

@terencehonles

Bug Report

Mypy incorrectly identifies an enum as final. This appears related to / caused by #11247.

To Reproduce

  1. create an enum with uninitialized annotated variables and a __new__ method
  2. extend the enum with the actual values for the enum

Expected Behavior

Mypy would not complain about the enum.

Actual Behavior

error: Cannot inherit from final class "TestEnum" [misc]

Your Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions