hauntsaninja / mypy_primer

Run mypy and pyright over millions of lines of code
MIT License
55 stars 29 forks source link

Let's try `django-stubs` #28

Open sobolevn opened 2 years ago

sobolevn commented 2 years ago

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 commented 2 years ago

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

No great reason:

hauntsaninja commented 2 years ago

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)
==========