Encountered against the latest checkouts, with mypy==0.521
Two lines:
from django.views import View # type: ignore
from django.db import models # type: ignore
Errors:
$ MYPYPATH=mypy-django mypy --strict-optional --disallow-untyped-calls test_mypy.py
mypy-django/django/views/generic/list.pyi:3: error: No library stub file for module 'django.db.models'
mypy-django/django/views/generic/list.pyi:3: note: (Stub files are from https://github.com/python/typeshed)
mypy-django/django/views/generic/list.pyi:4: error: No library stub file for module 'django.db.models.query'
One line:
from django.views import View # type: ignore
Errors:
$ MYPYPATH=mypy-django mypy --strict-optional --disallow-untyped-calls test_mypy.py
mypy-django/django/views/generic/dates.pyi:4: error: No library stub file for module 'django.db'
mypy-django/django/views/generic/dates.pyi:4: note: (Stub files are from https://github.com/python/typeshed)
mypy-django/django/views/generic/detail.pyi:3: error: No library stub file for module 'django.db'
mypy-django/django/views/generic/edit.pyi:3: error: No library stub file for module 'django.db'
mypy-django/django/views/generic/list.pyi:3: error: No library stub file for module 'django.db.models'
mypy-django/django/views/generic/list.pyi:4: error: No library stub file for module 'django.db.models.query'
This is stripped down from a more reasonably-sized file that actually did things, but it seems to be the imports themselves that triggered the issues.
I think this must be some kind of import-order issue.
(I forget why I was ignoring both lines, but it doesn't seem to really have a tangible effect on the output.)
Encountered against the latest checkouts, with mypy==0.521
Two lines:
Errors:
One line:
Errors:
This is stripped down from a more reasonably-sized file that actually did things, but it seems to be the imports themselves that triggered the issues.
I think this must be some kind of import-order issue.
(I forget why I was ignoring both lines, but it doesn't seem to really have a tangible effect on the output.)