- Notifications
You must be signed in to change notification settings - Fork 431
Open
Description
Running pyright on this code results in an error
"Type[Unknown]" is not a valid exception class (variable) DoesNotExist: Type[Unknown] class WidgetModel(Model): class Meta: # pyright: ignore[reportIncompatibleVariableOverride] table_name = "widgets" read_capacity_units = 1 write_capacity_units = 1 id = UnicodeAttribute(hash_key=True) name = UnicodeAttribute() WidgetModel.create_table(wait=True) try: WidgetModel.get("id") except WidgetModel.DoesNotExist: pytest.fail("WidgetModel does not exist")Perhaps the aliasing of the type name is confusing pyright.
DoesNotExist: Type[DoesNotExist] = DoesNotExistMetadata
Metadata
Assignees
Labels
No labels