The display decorator isn't limited to any specific type of callable, it accepts anything really.
The action decorator was trying to dictate a callable type that the ModelAdmin.actions expects. But that's the responsibility of ModelAdmin. And action also accepts anything.
I realised that:
display
decorator isn't limited to any specific type of callable, it accepts anything really.action
decorator was trying to dictate a callable type that theModelAdmin.actions
expects. But that's the responsibility ofModelAdmin
. Andaction
also accepts anything.Refs:
Self
is possible to use for actions -- ref: https://github.com/typeddjango/django-stubs/pull/1292#discussion_r1048313390