-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Mypy seems to have problems with Django projects containing multiple apps, not being able to follow imports to the other apps when running from the root directory. I've already filed a ticket with mypy itself about this, but there's no answer there yet.
A workaround I've found using the console that when I cd into the main source folder instead of the project root and list all apps manually, the imports work as expected. However, that's not possible with the mypy plugin, and I hate having to switch out of my IDE just for running mypy when a plugin already exists - adding the option to choose where to run mypy from should be easy to configure. I've already tried appending cd <foldername>; to the mypy command, but that doesn't work (error: The system cannot find the path specified.). It works just fine if the command field only contains the cd command, without mypy, but combining both doesn't work.
The reason why the project root is not the source root in my case is that I have a multilanguage project (Python / Django for the backend, Typescript / ReactJS for the frontend).