* remove mention of mypy newsemanal to prepare for 0.730
* make typecheck_tests CI really work
* fix lints
* fix intentional error
* merge stderr in stdout to preserve order
Co-authored-by: Daniel Hahler <github@thequod.de>
* WIP: fix scripts/typecheck_tests.py
Exit non-zero if it fails to run.
Currently it fails on CI, but goes unnoticed:
https://travis-ci.com/typeddjango/django-stubs/jobs/235296115
* exit on unexpected rc, and output on stderr
* Fix
* scripts/mypy.ini: django_settings_module=scripts.django_tests_settings
* Fix problem where Model instancess are not considered subtypes of each other due to fallback_to_any = True. Fixes#52.
- Added a stub for __getstate__ to Model.
- Added a stub for clean() to Model.
- Correct arg type for sort_dependencies so they are covariant (Iterable rather than List).
Test ignores:
- Added some test ignores in cases where a model inherits from 2 different base models.
- Added some test ignores for cases that MyPy flags as errors due to variable redefinitions or imports that are incompatible types.
* Address review comment.
* Support returning the correct values for the different QuerySet methods when using .values() and .values_list().
* Fix slicing on QuerySet. Fix django queries test, and remove some ignored errors that are no longer needed.
* Remove accidental change in RawQuerySet.
* Readded some still-necessary ignores to aggregation django test.
* Add more tests of first/last/earliest/last/__getitem__, per mkurnikov's comments.
- Fix .iterator()
* Re-add Iterator as base-class of QuerySet.
* Make QuerySet a Collection.
* - Fix return type for QuerySet.select_for_update().
- Use correct return type for QuerySet.dates() / QuerySet.datetimes().
- Use correct type params in return type for QuerySet.__and__ / QuerySet.__or__
- Re-add Sized as base class for QuerySet.
- Add test of .all() for all _Row types.
- Add test of .get() for all _Row types.
- Remove some redundant QuerySet method tests.
* Automatically fill in second type parameter for QuerySet.
... if second parameter is omitted.
* Fix bug where models with a class variable using a manager defined would interfere with other managers.
- Fill in the type argument for that particular instance of the manager, rather than modifying the bases of the Manager type.
- Instantiate a new Instance from determine_proper_manager_type so The code doesn't crash under mypy-mypyc.
* Use helpers.reparametrize_instance per review comment.
* Updated ignored errors in Django test for get_objects_or_404.
- For some reason, `Manager[nothing]` is now removed from expected types.
However, I think this makes sense anyway, as Manager is a subclass of QuerySet.