Skip to content

enum.nonmember has the wrong type #1974

@refi64

Description

@refi64

Summary

https://play.ty.dev/2314690d-c925-4cc1-a5cc-418c928628ca

from typing import reveal_type
import enum

class E(enum.Enum):
    A = enum.auto()
    X = enum.nonmember(123)

reveal_type(E.X)  # Revealed type: `Unknown | nonmember[int]`

This really should just be int.

Version

ty 0.0.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenums

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions