Maksim Kurnikov
0a0e1985d7
add value_to_string method to Field
2021-01-20 00:14:15 +03:00
Maksim Kurnikov
f07477260f
Merge pull request #558 from mkurnikov/jsonfield
...
Missing Django 3.1 items
2021-01-20 00:10:24 +03:00
Maksim Kurnikov
11c3f8cd11
add django 3.1 classproperty
2021-01-19 22:16:12 +03:00
Maksim Kurnikov
159f8b95ba
add django 3.1 jsonfield
2021-01-19 22:13:36 +03:00
Anas
58c087f7f5
Added cache in github actions to speed up CI ( #549 )
2020-12-22 23:37:41 +03:00
markedwards
2e9adce5eb
Add Field to django_stubs_ext.django_stubs_ext.patch._need_generic ( #547 )
2020-12-22 10:09:29 +03:00
markedwards
47bd07758b
Update django_stubs_ext documentation to reference settings ( #548 )
2020-12-19 11:50:46 +03:00
Marti Raudsepp
36d1778e2a
Django admin additions ( #543 )
2020-12-17 13:23:51 +03:00
proxi
caaa23ab8f
convince mypy that user.is_staff (and friends) are booleans ( #542 )
...
closes #512
Co-authored-by: proxi <51172302+3n-k1@users.noreply.github.com >
2020-12-16 23:28:01 +03:00
Marcin Wieczorek
cfd9379b58
Change patch_response_headers argument to Optional[int] ( Fixes #337 ) ( #338 )
2020-12-13 16:21:58 +03:00
Lysandros Nikolaou
d9c851abce
Do not force django.contrib.* dependencies ( #535 )
...
* Do not force django.contrib.* dependencies
Fixes #428 .
Fixes #534 .
* Add one more test with contenttypes installed, but auth not
2020-11-24 14:38:03 +03:00
Alisue
f3e0872d6e
Fix signature of RemoteUserBackend.configure_user ( #532 )
...
* Fix signature of RemoteUserBackend.configure_user
The function signature has changed from 2.1 on 2.2 but django-stubs did not follow that.
https://github.com/django/django/blob/2.1.15/django/contrib/auth/backends.py#L163
https://github.com/django/django/blob/2.2/django/contrib/auth/backends.py#L177
* Use HttpRequest on request to make it more explicit
2020-11-19 18:38:59 +03:00
javulticat
4cb13a6ac5
AttributeError exception in copy_method_to_another_class ( #531 )
...
* Fix for method_node having no arguments
* Trim whitespace
2020-11-17 10:24:59 +03:00
Nikita Sobolev
19d695b1da
Update misspel.yml
2020-11-17 10:15:18 +03:00
sobolevn
16326e999c
Fixes CI
2020-11-14 21:18:09 +03:00
sobolevn
517ae648e5
Adds more types to patch
2020-11-14 20:46:32 +03:00
sobolevn
3e0f144148
Fixes README
2020-11-14 20:05:36 +03:00
Nikita Sobolev
8a68111ce5
Closes #529 ( #530 )
...
* Closes #529
* Fixing CI
* Fixing CI
* new monorepo setup
2020-11-14 20:03:50 +03:00
sobolevn
9f966a8056
django_stubs_ext release 0.1.0
2020-11-14 19:17:38 +03:00
proxy
0c41d0c6e9
create monkeypatching function for adding get_item dunder ( #526 )
...
* run black
* create monkeypatching function for adding get_item dunder
* whoops i forgot the test
* change the name in INSTALLED_APPS to make test pass
* turn the whole thing into a proper package
* move django_stubs_ext to requirements.txt
* also install requirements.txt
* attempt to fix pre-commit
* numerous small code review fixes
* fix dependency issues
* small dependency fixes
* configure proper license file location
* add the rest of the monkeypatching
* use strict mypy
* update contributing with a note monkeypatching generics
* copy release script from parent package
2020-11-11 10:04:13 +03:00
Tim Martin
e798b496c0
Add stubs for remaining commands in django.core.management.commands ( #525 )
...
* Add stubs for remaining commands in django.core.management.commands
* Tighten up stub definitions in django.core.management.commands
* Apply some missing declarations in django.core.management.commands
2020-11-11 01:56:41 +03:00
Francesc
01af2ff588
Annotate get_asgi_application ( #527 )
2020-11-09 20:27:17 +03:00
proxy
aab8acf2ea
change get_user to use a protocol requiring a session ( #522 )
...
* change get_user to use a protocol requiring a session
define a "_HasSession" protocol, and update contrib.auth.get_user to use it
get_user only requires a session field, and idiomatic django testing frequently calls get_user with a TestClient
* run black
* use union for get_user instead of a protocol
* create tests for get_user typechecking
* properly import test client
2020-11-07 11:38:45 +03:00
Clarity
1c4a7d25c7
Add Point and Polygon to contrib.gis.geos ( #524 )
2020-11-07 01:34:47 +03:00
Robert Huselius
a0d61c0de3
Change InlineModelAdmin.formset to Type[BaseInlineFormSet] ( #521 )
...
* Change InlineModelAdmin.formset to Type[BaseInlineFormSet]
* More exact annotations + add NaturalTimeFormatter
* Correction: cls type is Type[...]
* Complete annotations for PasswordResetTokenGenerator
* fix *gettext*_lazy annotations
2020-11-06 11:04:34 +03:00
Ceesjan Luiten
e837dac26a
Fix ResourceWarning ( #520 )
2020-11-05 16:47:41 +03:00
Yanky Hoffman
bbdf15a6ec
Add is_active field to django.contrib.auth.AbstractBaseUser model ( #517 )
...
* Add `is_active` field to `django.contrib.auth.AbstractBaseUser` model
* Favor defining type than setting concrete value
* Update type to reflect sub-class implementation
2020-11-03 18:07:45 +03:00
proxy
f08b428027
make FormMixin generic to allow proper typing for LoginView ( #515 )
...
closes #514
2020-10-31 21:53:45 +03:00
Na'aman Hirschfeld
44151c485d
updated package setup ( #485 )
...
* updated package setup
* updated to use python 3.9
* fixed test runner
* fixed typecheck tests
* fixed discrepencies
* added override to runner
* updated travis
* updated pre-commit hooks
* updated dep
2020-10-29 11:59:48 +03:00
Brian Helba
a3624dec36
Provide a more specific signature for django.core.checks.register ( #509 )
...
This also corrects the fact that "run_checks" only returns a concatenated list
of all registered check results, which may only contain CheckMessage:
https://github.com/django/django/blob/302caa40e4caab7d95ef7d0a88a90f935039ab09/django/core/checks/registry.py#L60
2020-10-29 10:31:26 +03:00
Brian Helba
6dc2c32382
Ensure that all registered checks take the same parameters ( #499 )
...
The Django API requires that registered checks take an "app_configs"
argument, which is a list of AppConfig. This is practically also passed by
keyword, so all parameters should be specified with a "= ..." to indicate
that they are keywords.
Django always passed "app_configs" as a list, but checks can accept and
use a more general more Sequence.
The Django API also requires that registered checks take "**kwargs".
This results in the canonical parameters of:
"app_configs: Optional[Sequence[AppConfig]] = ..., **kwargs: Any"
2020-10-29 02:21:32 +03:00
Brian Helba
695cdb16ca
Add django.forms.widgets.FILE_INPUT_CONTRADICTION symbol ( #506 )
...
https://github.com/django/django/blob/302caa40e4caab7d95ef7d0a88a90f935039ab09/django/forms/widgets.py#L399
2020-10-29 02:20:40 +03:00
sobolevn
cb1fa08a82
Version 1.7.0 released
1.7.0
2020-10-28 11:41:15 +03:00
proxy
e2f6abe579
add additional failing test for ModelAdmin generic ( #505 )
...
this will ensure that the generic constraint holds
2020-10-28 10:28:04 +03:00
proxy
ffb6551eb4
make BaseModelAdmin generic to properly type methods dealing with models ( #504 )
...
* make BaseModelAdmin generic to properly type the `obj` argument of ModelAdmin.delete_model
closes #482
* turn BaseModelAdmin into bound generic, run black
* add test for generic ModelAdmin
2020-10-28 01:02:43 +03:00
Nikita Sobolev
40c8bfa510
Update migration.pyi ( #501 )
...
* Update migration.pyi
* Fixes tests
* Fixes tests
* Fixes tests
2020-10-26 11:43:47 +03:00
Nikita Sobolev
402b7d563f
Update http.pyi ( #502 )
2020-10-26 00:01:36 +03:00
Daniel Hillier
92eb068a04
Fix #224 add paths in mypy's mypy_path option or MYPYPATH env var for import discovery ( #498 )
2020-10-23 01:06:49 +03:00
Brian Helba
9d4d06f8b3
Allow overridable checks to be CheckMessage ( #497 )
...
* Allow overridable checks to be CheckMessage
The checks framework expects return types to be "List[CheckMessage]". This
allows all overridable checks-returning methods to return the more general
"CheckMessage", instead of the "Error" subclass.
* Ignore an incorrect usage of the checks API in Django 2.2
2020-10-22 15:12:36 +03:00
giladsheffer
d746e3f5e4
user parameter for login accepts None ( #496 )
...
Co-authored-by: Gilad Sheffer <gilad@orca.security >
2020-10-19 18:15:44 +03:00
proxy
8729a74f81
correct the type signature of AbstractBaseUser.set_password ( #493 )
2020-10-18 11:54:10 +03:00
Mark Story
56361b353e
Fix typoand grammar in readme ( #491 )
2020-10-15 12:47:15 +03:00
Noam
b71c9ad282
Changed model exceptions to use more specific base classes. ( #490 )
2020-10-14 18:41:23 +03:00
Na'aman Hirschfeld
ce370ea79f
Missing stubs ( #467 )
...
* adding missing db.backends typings and updated test
* added missing stubs
* reformatted files
* removed contrib.postgres.forms
* fixed test
2020-10-11 12:14:08 +03:00
Mariam Maarouf
2a732fd257
renderer = BaseRenderer instead of EngineMixin in Widget.render() ( #481 )
2020-10-07 20:19:12 +03:00
sobolevn
645ee97e78
Release 1.6.0
1.6.0
2020-10-01 10:57:05 +03:00
William Schwartz
5bc3759ea2
Template Loader.get_template_sources yield Origins ( #476 )
...
django.template.loaders.base.Loader.get_template_sources should yield Origins:
https://docs.djangoproject.com/en/3.1/ref/templates/api/#django.template.loaders.base.Loader.get_template_sources
Currently it's returning none. Objects that yield should be marked as iterables.
https://mypy.readthedocs.io/en/stable/kinds_of_types.html#generators
2020-09-30 01:21:38 +03:00
henribru
534a028ea2
Use AbstractBaseUser where possible ( #475 )
...
Fixes #431
2020-09-29 22:04:20 +03:00
Nicolas Delaby
87856754ea
psycopg2-binary is faster to install ( #473 )
2020-09-29 12:50:11 +03:00
Szymon Pyżalski
2f7fac2eaf
Allowed to use decimal in combinables ( #454 )
...
Co-authored-by: Szymon Pyżalski <spyzalski@egnyte.com >
2020-09-21 15:00:32 +03:00