You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be more strict when infering ForeignKey models specified as string
The failing `func_noerror_foreignkeys` was caused by pylint_django
trying to infer a ForeignKey('Author') field by looking at the
astroid cache. In this case there was an Author model already
defined in `func_noerror_duplicate_except_doesnotexist` which
was inferred and of course this model didn't have the `author_name`
field hence we got a no-member error.
This commit tries to restrict where we load these models from
and also takes into account the quirk that Django allows specifying
'appname.Model' instead of 'path.to.python.module.models.Model'.
0 commit comments