Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🐞) Wrong error code on bare enum literal #13236

Closed
KotlinIsland opened this issue Jul 26, 2022 · 1 comment
Closed

(🐞) Wrong error code on bare enum literal #13236

KotlinIsland opened this issue Jul 26, 2022 · 1 comment
Labels
bug mypy got something wrong topic-enum topic-error-reporting How we report errors

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Jul 26, 2022

from enum import Enum

class E(Enum):
    A = 1
    
a: E.A  # error: Invalid type: try using Literal[E.A] instead?  [misc]
b: 1   # error: Invalid type: try using Literal[1] instead?  [valid-type]

I'll fix this when I'm free.

@KotlinIsland KotlinIsland added the bug mypy got something wrong label Jul 26, 2022
@KotlinIsland
Copy link
Contributor Author

Looks like this was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-enum topic-error-reporting How we report errors
Projects
None yet
Development

No branches or pull requests

2 participants