Skip to content

Commit

Permalink
remove spurious int error
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Oct 26, 2024
1 parent 2afee12 commit 4652764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test-data/unit/check-enum.test
Original file line number Diff line number Diff line change
Expand Up @@ -2216,10 +2216,9 @@ from typing import Any, Callable, Dict
class Foo(Enum):
Bar: Foo = Callable[[str], None] # E: Enum members must be left unannotated \
# N: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members \
# E: Value of type "int" is not indexable
# E: Incompatible types in assignment (expression has type "<typing special form>", variable has type "Foo")
Baz: Any = Callable[[Dict[str, "Missing"]], None] # E: Enum members must be left unannotated \
# N: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members \
# E: Value of type "int" is not indexable \
# E: Type application targets a non-generic function or class \
# E: Name "Missing" is not defined

Expand All @@ -2228,3 +2227,4 @@ reveal_type(Foo.Bar.value) # N: Revealed type is "__main__.Foo"
reveal_type(Foo.Baz) # N: Revealed type is "Literal[__main__.Foo.Baz]?"
reveal_type(Foo.Baz.value) # N: Revealed type is "Any"
[builtins fixtures/tuple.pyi]
[typing fixtures/typing-full.pyi]

0 comments on commit 4652764

Please sign in to comment.