Commit Graph
100 Commits
Author SHA1 Message Date
Maxim Kurnikov a85dbff793 update import_all test, add some stubs for postgres (#178) 2019-09-23 19:47:11 +03:00
Maxim Kurnikov 68aebe2528 Add django.contrib.gis.db.models and django.contrib.gis.db.models.fields (#177)
* add django.contrib.gis.db.models and django.contrib.gis.db.models.fields

* install gdal in ci

* add sudo to apt

* add apt update
2019-09-23 19:30:32 +03:00
Maxim Kurnikov 29ac1c3017 Split AddManagers for model in separate stages to process IncompleteDefnException properly (#171) 2019-09-18 02:20:20 +03:00
Maxim Kurnikov 23ad65033b add custom Field processing for mixins used in the Model subclasses (#167) 2019-09-18 01:40:41 +03:00
Maxim Kurnikov 64720f492c add proper stubs for django.contrib.auth.models model fields (#170) 2019-09-18 01:40:15 +03:00
Maxim Kurnikov a8fdd4c673 cleanup some stubs in contrib.admin, contrib.admindocs (#169) 2019-09-17 23:30:49 +03:00
Maxim Kurnikov 813dd8cc1a make types for generic mixins less strict (#168) 2019-09-17 23:30:07 +03:00
Maxim KurnikovandDaniel Hahler 2b53fa5a1a Fix typecheck tests ci (#165)
* 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>
2019-09-16 14:35:13 +03:00
Maxim Kurnikov de4fa92441 bump to 1.1.0 2019-08-24 18:40:57 +03:00
Maxim Kurnikov dce0c0e930 Add 'django.core.cache.backends.memcached' stubs (#141) 2019-08-24 18:35:42 +03:00
Maxim Kurnikov fc9a335dfd make ValuesQuerySet have proper Collection generic type (#140) 2019-08-24 18:24:21 +03:00
Maxim Kurnikov 5fc39ff110 Merge pull request #139 from mkurnikov/none-to-optional-annotations
Replace None annotations with Optional[...] around, stability fixes
2019-08-24 17:32:14 +03:00
Maxim Kurnikov e95b40ef52 stability fixes 2019-08-24 17:04:50 +03:00
Maxim Kurnikov c91a6d1d5b replace None annotations with Optional[] around 2019-08-24 16:35:07 +03:00
Maxim Kurnikov d7e8222163 Fix related fields inheritance from abstract models (#138) 2019-08-24 02:35:55 +03:00
Maxim Kurnikov 09767210ec Return corresponding descriptors for some fields in class access (#137)
* return corresponding descriptors for some related fields in class access

* return corresponding descriptors for file fields in class access

* fix tests
2019-08-23 04:03:03 +03:00
Maxim Kurnikov 656105bab2 make first() an Optional, allow to specify QuerySet with one parameter (#136) 2019-08-23 03:31:07 +03:00
Maxim Kurnikov 5d2efdb80b Merge pull request #119 from mkurnikov/subclass-queryset-proper-typing
Allow to subclass queryset without loss of typing
2019-07-26 22:47:02 +03:00
Maxim Kurnikov 27793ecd32 allow to subclass queryset without loss of typing 2019-07-26 22:40:37 +03:00
Maxim Kurnikov dddcb20fe4 bump version to 1.0.2 2019-07-26 22:22:22 +03:00
Maxim Kurnikov 6b21a0476d Remove psycopg2 from dependencies (#117)
* remove psycopg2 from direct dependencies, only add it in tests

* bump to 1.0.1

* fix mypy
2019-07-26 18:39:42 +03:00
Maxim Kurnikov 735b58e9bf values_list for related model id flat True (#113) 2019-07-25 21:33:45 +03:00
Maxim Kurnikov b4cd9757b0 Merge pull request #109 from mkurnikov/new-semanal
New semanal support, rewrite to use Django app registry
2019-07-25 20:14:03 +03:00
Maxim Kurnikov 1b6c337aef enable mypy typechecking for plugin code 2019-07-25 20:03:10 +03:00
Maxim Kurnikov bc42cc2fa1 add python3.6 tests typechecking 2019-07-25 19:56:37 +03:00
Maxim Kurnikov 62dac1d468 remove some asserts that could be validly triggered 2019-07-25 19:53:12 +03:00
Maxim Kurnikov 409c01eb24 allow to specify QuerySet with one parameter 2019-07-25 19:22:59 +03:00
Maxim Kurnikov a0a2ecaf46 fix additional mypy config and auto settings 2019-07-25 19:14:36 +03:00
Maxim Kurnikov 4c21855641 fix mypy errors 2019-07-25 18:52:51 +03:00
Maxim Kurnikov 6466c57c69 update setup.py 2019-07-25 17:28:39 +03:00
Maxim Kurnikov 0bb41bc791 add notes about new manager types to README 2019-07-25 17:17:47 +03:00
Maxim Kurnikov 8894de0a04 add new config options to README 2019-07-25 17:03:37 +03:00
Maxim Kurnikov a019fe9715 csrf middleware callable can be none 2019-07-25 15:03:10 +03:00
Maxim Kurnikov a97d76020c enable tests typechecking using django submodule 2019-07-24 23:44:57 +03:00
Maxim Kurnikov ae8e42dd53 lint 2019-07-24 22:56:14 +03:00
Maxim Kurnikov 64049b60b0 add missing psycopg2 dependency 2019-07-24 22:54:12 +03:00
Maxim Kurnikov b6a5ccabdf move configuration to [mypy.plugins.django-stubs] inside mypy config file 2019-07-24 22:32:52 +03:00
Maxim Kurnikov e6d7a570e8 fix merge artifact 2019-07-24 22:05:05 +03:00
Maxim Kurnikov 6332620443 rewrite pytest-mypy-plugin extension code to use new hook 2019-07-24 13:39:24 +03:00
Maxim Kurnikov df021f6baa add some support for proxy models 2019-07-24 13:39:23 +03:00
Maxim Kurnikov 57796077c6 create(id=None) is valid, if id is AutoField 2019-07-24 13:38:50 +03:00
Maxim Kurnikov 46c48b504f tweak travis config to use new tests properly 2019-07-24 13:38:50 +03:00
Maxim Kurnikov 4dfa363521 lint fixes 2019-07-24 13:38:50 +03:00
Maxim Kurnikov 5b2aacddba add missing field methods 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 2c001fd8a7 cleanups 2019-07-24 13:38:49 +03:00
Maxim Kurnikov a0db24c764 add objects to model, trade false positive for false negative 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 39fb48b08a fix httprequest other fields 2019-07-24 13:38:49 +03:00
Maxim Kurnikov d7d379e1cd create dummy classes for custom_manager_of_model usecase 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 6962b42cba allow to use fields as Field objects outside Model classes 2019-07-24 13:38:49 +03:00
Maxim Kurnikov df77299c2f cleanups 2019-07-24 13:38:49 +03:00
Maxim Kurnikov b86d33c718 allow custom app label for ForeignKey 2019-07-24 13:38:49 +03:00
Maxim Kurnikov fa57fb0cbf request.user has type of AUTH_USER_MODEL 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 248504c25a various fixes 2019-07-24 13:38:49 +03:00
Maxim Kurnikov fee4aad3d0 fix OneToOneField without related_name 2019-07-24 13:38:49 +03:00
Maxim Kurnikov fc9843bea6 add support for _meta.get_field() typechecking 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 5bb1bc250d add get_next_by_FOO, get_previous_by_FOO for date,datetime fields 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 1721c997be add support for get_FIELD_display for choices fields 2019-07-24 13:38:49 +03:00
Maxim Kurnikov bba6f769b5 add django.contrib.contenttypes to all tests by default 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 07a9bcd4cb remove dataclasses dependency 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 6ece759ca0 remove runtime dependency on pytest-mypy-plugins 2019-07-24 13:38:49 +03:00
Maxim Kurnikov caf69ec1c9 add Django dependency 2019-07-24 13:38:49 +03:00
Maxim Kurnikov f2e79d3bfb add GenericForeignKey support, remove some false-positives 2019-07-24 13:38:49 +03:00
Maxim Kurnikov bfa77efef5 one more edge case for values() 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 4f935edd47 add reverse lookups to values(), values_list() 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 03b59b872d cleanups, fallback to Any in some corner cases 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 0e72b2e6fc more values(), values_list() cases 2019-07-24 13:38:49 +03:00
Maxim Kurnikov b81fbdeaa9 remove -semanal suffix 2019-07-24 13:38:49 +03:00
Maxim Kurnikov dc6101b569 remove old semanal plugin data 2019-07-24 13:38:49 +03:00
Maxim Kurnikov d53121baae add support for forms, values, values_list 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 3c3122a93f add settings support 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 7b1b1b6bfe add related managers support 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 2cb1f257eb add proper __init__, create() support 2019-07-24 13:38:49 +03:00
Maxim Kurnikov b11a9a85f9 new semanal wip 1 2019-07-24 13:38:49 +03:00
Maxim Kurnikov 9c5a6be9a7 split helpers into smaller files 2019-07-24 13:38:49 +03:00
Maxim Kurnikov a9c1bcbbc6 Merge pull request #111 from rik/has_perm
More accurate `PermissionsMixin.has_perm`
2019-07-21 19:23:18 +03:00
Maxim Kurnikov 335c5765c3 enable test folders: select_for_update, i18n, httpwrappers, auth_tests, extra_regress (#107) 2019-07-10 19:38:36 +03:00
Maxim Kurnikov b397ec04a9 add utils_tests test folder to typechecking (#106) 2019-07-10 18:19:37 +03:00
Maxim Kurnikovandcs-cordero 2f6af159f7 add correct return annotation to get_storage_class (#103)
Co-Authored-By: cs-cordero <chris.s.cordero@gmail.com>
2019-07-10 14:06:09 +03:00
Maxim Kurnikov 2799646723 add missing files throughout the codebase (#102) 2019-07-09 05:18:15 +03:00
Maxim Kurnikov d8230a4147 Add typechecking for 'file_storage', 'files' test folders (#101)
* add typechecking for 'file_storage', 'files' test folders

* fix File class annotations
2019-07-07 03:58:00 +03:00
Maxim Kurnikov 90cab6c5bf revert meta: Options annotation (#99) 2019-07-01 22:33:00 +03:00
Maxim Kurnikov a77d5b27d8 Update typecheck_tests to django 2.2 branch, remove unused ignores (#98)
* update typecheck_tests to django 2.2 branch, remove unused ignores

* lint fixes
2019-07-01 18:44:34 +03:00
Maxim Kurnikov 4e1c32f6a3 Fix mypy==0.710 errors (#97)
* error -> note for revealed type for tests

* fixes for latest mypy
2019-07-01 00:51:56 +03:00
Maxim Kurnikov ea1294bd30 set version to 0.13.0, bump mypy to 0.710 2019-07-01 00:02:41 +03:00
Maxim Kurnikov 79d691732d do not release if uncommitted changes 2019-07-01 00:02:41 +03:00
Maxim Kurnikov 86642e3ddd bump version 2019-04-15 14:50:43 +03:00
Maxim Kurnikov 5dd6eccdb5 make ignore_missing_model_attributes behaviour optional (#66)
make "ignore_missing_model_attributes" behaviour opt-in
2019-04-12 17:22:18 +03:00
Maxim Kurnikov fd06816cbb Work around "no settings module" crash (#65)
Workaround "no settings module" crash
2019-04-12 17:14:23 +03:00
Maxim Kurnikov aeb435c8b3 Disable monkeypatches, add dependencies via new hook (#60)
* code cleanups, disable monkeypatches, move to add_additional_deps

* disable incremental mode for tests

* add pip-wheel-metadata

* move some code from get_base_hook to get_attribute_hook to reduce dependencies

* simplify values/values_list tests and code

* disable cache for some tests failing with incremental mode

* enable incremental mode for tests typechecking

* pin mypy version

* fix tests

* lint

* fix internal crashes
2019-04-12 14:54:00 +03:00
Maxim Kurnikov 13d19017b7 bump version 2019-04-01 19:40:13 +03:00
Maxim Kurnikov 28a3f126ee make mypy.checker import locally to prevent import cycles 2019-04-01 19:39:50 +03:00
Maxim Kurnikov 304cb19de6 really drop universal 2019-04-01 01:43:14 +03:00
Maxim Kurnikov c57f4f7152 only python3.6+ are supported 2019-04-01 01:08:46 +03:00
Maxim Kurnikov 8a826fee1e bump version 2019-04-01 00:54:36 +03:00
Maxim Kurnikov 37d85c2ca6 pin mypy version, django-stubs not yet supports mypyc 2019-04-01 00:54:15 +03:00
Maxim Kurnikov 9288c34648 fix @classproperty return type (#58) 2019-03-27 23:13:10 +03:00
Maxim Kurnikov 70050f28b9 drop --universal 2019-03-26 03:23:25 +03:00
Maxim Kurnikov 4338c17970 bump version 2019-03-25 14:22:17 +03:00
Maxim Kurnikov 91f789c38c fix SessionBase.exists() return type (#57) 2019-03-25 14:21:12 +03:00
Maxim Kurnikov 0f5b45fba1 bump version 2019-03-25 13:31:41 +03:00