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
If you have a foreign key or similar that refers to a model with a string, and you have a custom app name for the app where that model lives, the inferred type falls back to Any:
class UserConfig(AppConfig):
name = 'hyre.user'
label = 'hyre__user'
if TYPE_CHECKING:
from hyre.user.models import User
class MyClass(models.Model):
some_fk = models.ForeignKey( 'hyre__user.User', ...)
mypy-django will look for the model User in a file called hyre__user, but only hyre.user exists in all_modules in helpers.py.
The text was updated successfully, but these errors were encountered:
If you have a foreign key or similar that refers to a model with a string, and you have a custom app name for the app where that model lives, the inferred type falls back to Any:
mypy-django will look for the model User in a file called hyre__user, but only hyre.user exists in
all_modules
in helpers.py.The text was updated successfully, but these errors were encountered: