Open markedwards opened 3 years ago
I have the same issue. Does anyone know how to get this working?
This is still happening in the latest release. Is this not considered to be a bug?
Same question over here...
I'm currently facing the same issue, which I believe to be related to what's described in #336.
Any insights or updates on this? @sobolevn maybe? :) I've already looked into the code here and as far as I can tell, mypy should be able to pick up the bound types for the generics. If there are any pointers as to what might be needed to support this I'd be happy to contribute as well.
Bug report
I'm trying to implement generic typing on custom fields, and I'm not having much luck. Any idea if there is a way to make this work?
What's wrong
Note: The following examples require hacking
django_stubs_ext.patch._need_generic
to includedjango.db.models.Field
, which is something I'll raise separately.I'm able to specify static typing for a custom field, but I'm not able to specify generic typing. Example code:
How is that should be
Have I missed something in my implementation, or is this not supported?
System information
python
version: 3.8.6django
version: 3.1.4mypy
version: 0.790django-stubs
version: 0.1.0