When I run mypy, I get this error:
emails/admin.py:43: error: Missing type parameters for generic type "ModelAdmin"
And this is the corresponding code snippet:
@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
list_display = ('subject', 'thread', 'user', 'email_account', 'from_name', 'from_email', 'local_timestamp')
search_fields = ('subject','thread__synced_with_email', 'user__username', 'email_account__synced_email_current', 'from_name', 'from_email')
ordering = ('subject', 'thread')
This class is not exactly a function so I do not understand why the type-hint is checked by mypy. There is nothing that gets returned and no parameters are passed.