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
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
Anton Agestam
629ba954b4
fix: remove SuccessMessageMixin.form_valid violation of Liskov substitution principle ( #84 )
2019-06-02 13:23:37 +03:00
Ran Benita
0e60b70ae4
A couple of small fixes ( #81 )
...
* Fix type of django.contrib.postgres.fields.JSONField(verbose_name)
* Improve type for CursorWrapper.execute(params)
Not perfect. Based on simple cases from
http://initd.org/psycopg/docs/usage.html#adaptation-of-python-values-to-sql-types
2019-05-21 21:26:45 +03:00
Ville Skyttä
dd5b98faf0
django.contrib.messages.api: use HttpRequest instead of WSGIRequest ( #73 )
...
Its error messages explicitly note that an HttpRequest is required.
https://docs.djangoproject.com/en/2.1/_modules/django/contrib/messages/api/#add_message
2019-05-21 17:23:19 +03:00
Ethan Smith
e634a5d460
Re-export names from django.core.cache.backend.base ( #71 )
2019-05-19 19:59:14 +03:00
aszlig
d7d7e6c66e
Fix type of prefix arg in staticfiles_urlpatterns ( #74 )
...
Using a *type* of None for the prefix keyword argument is not going to
typecheck very well, so it might be a typo here because the default
value (rather than the type) is None.
Signed-off-by: aszlig <aszlig@nix.build >
2019-05-19 19:59:00 +03:00
Anthony Ricaud
b66727657d
Type non-parametrised views.decorators.http ( #80 )
...
Fixes `error: Untyped decorator makes function "view" untyped`
2019-05-17 20:40:40 +03:00
Maxim Kurnikov
86642e3ddd
bump version
v0.12.1
2019-04-15 14:50:43 +03:00
Maciej Gol
952e1c3ee9
Preserve callable type in view decorators ( #67 )
2019-04-13 22:31:49 +03:00
Maxim Kurnikov
5dd6eccdb5
make ignore_missing_model_attributes behaviour optional ( #66 )
...
make "ignore_missing_model_attributes" behaviour opt-in
v0.12.0
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