Open
Description
Hi!
How to make library friends with mypy?
For example if I use code from readme
class MyModelAdmin(DjangoObjectActions, admin.ModelAdmin):
def toolfunc(self, request: HttpRequest, obj: MyModel) -> None:
pass
toolfunc.label = "This will be the label of the button"
toolfunc.short_description = "This will be the tooltip of the button"
I catch this error from mypy:
"Callable[[MyModelAdmin, HttpRequest, MyModel], None]" has no attribute "label"
"Callable[[MyModelAdmin, HttpRequest, MyModel], None]" has no attribute "short_description"
For example for django admin short_description
and etc. I use django-admin-display. How do you look at adding something like this to your project?
Metadata
Metadata
Assignees
Labels
No labels