Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Open
Description
importenumfromtypingimportLiteralclassFoo(enum.IntEnum):foo=1bar=2deffoo(bar:Literal[Foo.foo|Foo.bar])->None:pass
ty detect this asinvalid-type-form:
$ ty check t.py t.py:10:22: error[invalid-type-form] Type argumentsfor`Literal` must be`None`, a literal value (int, bool, str, or bytes), or an enum member