Commit Graph

529 Commits

Author SHA1 Message Date
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
Anthony Ricaud
f365297baf Allow any Collection to be passed to has_perms 2019-07-21 02:09:05 +01:00
Anthony Ricaud
6859ec94b6 More accurate PermissionsMixin.has_perm
It only accepts `str` for `perm`
2019-07-19 12:42:03 +01: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
Nikita Sobolev
f7db296e8b Makes localtime/localdate accept optional params (#105)
* Makes localtime/localdate accept optional params

Closes #104

* Removed None from default values
2019-07-10 15:58:10 +03:00
Maxim Kurnikov
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
Peter Law
861c6653fd Make SuccessMessageMixin fully compatible with FormMixin (#86)
This ensures that the order in which these mixins are included
into a derrived class does not matter and ends up more accurately
reflecting the return type of SuccessMessageMixin in the process
(its code doesn't appear to enforce that the returned response
is a redirect).

This provides a fix to a secondary aspect of
https://github.com/mkurnikov/django-stubs/issues/79.
2019-07-02 13:34:05 +03:00
Konstantin Alekseev
db7b46589f Add timezone.localdate() (#87) 2019-07-02 13:33:28 +03:00
Maxim Kurnikov
90cab6c5bf revert meta: Options annotation (#99) 2019-07-01 22:33:00 +03:00
Peter Law
25165de80f Add get_candidate_relations_to_delete (#92)
* Set a precise type for Model._meta

* Add missing 'get_candidate_relations_to_delete' function signature

Fixes https://github.com/mkurnikov/django-stubs/issues/77.
2019-07-01 18:50:01 +03:00
Peter Law
2295b14214 Allow any iterable to be passed to method_decorator (#90)
From reading the source of Django 2.1.9, this seems to be what's
allowed there.

Fixes https://github.com/mkurnikov/django-stubs/issues/78.
2019-07-01 18:49:40 +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