Replies: 1 comment
-
Please, report this to our tracker: https://github.com/typeddjango/django-stubs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Throughout my codebase I have a number of related_name relations defined. For most, django-stubs (latest release) seems to be generating the requisite annotations to make MyPy pass, but for certain models the annotation is not being generated. One example of this is a more complicated structure than a simple model to model, foreign key reference, as it uses an abstract base model, eg:
With this particular structure, I am receiving the mypy error
"Fruit" has no attribute "image"
Is there anything I need to do to properly annotate reverse relations of this form?
Beta Was this translation helpful? Give feedback.
All reactions