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
Where `mysettings` is a value of `DJANGO_SETTINGS_MODULE` (with or without quotes)
54
54
55
-
You might also need to explicitly tweak your `PYTHONPATH` the very same way `django` does it internally in case you have troubles with mypy / django plugin not finding your settings module. Try adding the root path of your project to your `PYTHONPATH` environment variable like so:
56
-
57
-
```bash
58
-
PYTHONPATH=${PYTHONPATH}:${PWD}
59
-
```
60
-
61
55
Current implementation uses Django runtime to extract models information, so it will crash, if your installed apps `models.py` is not correct. For this same reason, you cannot use `reveal_type` inside global scope of any Python file that will be executed for `django.setup()`.
62
56
63
57
In other words, if your `manage.py runserver` crashes, mypy will crash too.
0 commit comments