8000 (🐞) `Enum.name` is `Any` in 3.11 · Issue #7564 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content
(🐞) Enum.name is Any in 3.11 #7564
Closed
python/mypy
#14133
@KotlinIsland

Description

@KotlinIsland
from enum import Enum

value: Enum

reveal_type(value)
reveal_type(value.name)
> mypy --python-version 3.10 test.py
test.py:5: note: Revealed type is "enum.Enum"
test.py:6: note: Revealed type is "str"
Success: no issues found in 1 source file

> mypy --python-version 3.11 test.py
test.py:5: note: Revealed type is "enum.Enum"
test.py:6: note: Revealed type is "Any"

Not 100% sure if this is a mypy issue or a typeshed issue,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0