Skip to content
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

Let's try django-stubs #28

Closed
wants to merge 2 commits into from
Closed

Conversation

sobolevn
Copy link
Contributor

Probably it should work even without our mypy plugin.
At least our CI check passes without it: https://github.com/typeddjango/django-stubs/blob/master/.pre-commit-config.yaml#L38-L53

P.S. why don't we use pip install -r requirements? Why all deps are copied?

@hauntsaninja
Copy link
Owner

why don't we use pip install -r requirements?

No great reason:

  • I was hoping at some point to restore the ability for typeshed to see the impact of changes to third party stubs, in which case have the stub dependencies listed out statically would help
  • At the time I updated these projects for modular typeshed, many did not have stubs dependences listed in a requirements file (e.g. only installed type stubs in CI or tox). I dislike mypy --install-types
  • Some projects have a million dependencies that take forever to install

@hauntsaninja
Copy link
Owner

Looks like this doesn't work:

(mypy_primer) ~/dev/mypy_primer patch-1 λ mypy_primer -k typeddjango

django-stubs
https://github.com/typeddjango/django-stubs
----------

old mypy
> /tmp/mypy_primer/old_mypy/venv/bin/mypy django-stubs mypy_django_plugin --python-executable=/tmp/mypy_primer/projects/_django-stubs_venv/bin/python --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit ' -1'
	mypy.ini:13: error: Error importing plugin "mypy_django_plugin.main": No module named 'mypy_django_plugin'
	Found 1 error in 1 file (errors prevented further checking)
----------

new mypy
> /tmp/mypy_primer/new_mypy/venv/bin/mypy django-stubs mypy_django_plugin --python-executable=/tmp/mypy_primer/projects/_django-stubs_venv/bin/python --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit ' -1'
	mypy.ini:13: error: Error importing plugin "mypy_django_plugin.main": No module named 'mypy_django_plugin'
	Found 1 error in 1 file (errors prevented further checking)
==========

@brianschubert
Copy link

Looks like this can be closed as superseded by #124 🎉

@hauntsaninja
Copy link
Owner

Thanks for mentioning!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants