-
-
Notifications
You must be signed in to change notification settings - Fork 485
Unable to import Celery #2290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a duplicate of #329 The plugin uses the Django runtime, so if the runtime crashes, the plugin/mypy crashes. It's also mentioned in the README section "mypy crashes when I run it with this plugin installed" To fix it you need to make sure the environment you're running |
@flaeppe the env does has celery installed if i comment out mypy the application works just fine. also opening the python terminal in the env and running celery imports also work fine |
Looks like, from the traceback, that mypy runs via pre-commit. Does the pre-commit environment have celery installed and available? |
it's there in requirements.txt do i need to do anything else? |
@flaeppe i have added
in the precommit config . It doesn't work still |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Unable to run mypy with django-stubs, even with ignore_missing_imports=true.
Celery is set up in the app2/ init.py file:
What's wrong
Should be able to run mypy checks without crashing.
How is that should be
System information
python
version: 3.9.6django
version: 4.2.13mypy
version: 1.7.1django-stubs
version: 4.2.7django-stubs-ext
version: 4.2.7The text was updated successfully, but these errors were encountered: