Maxim Kurnikov
02bdf5be95
add support for typechecking of filter/get/exclude arguments ( #183 )
...
* add support for typechecking of filter/get/exclude arguments
* linting
2019-09-30 03:05:40 +03:00
Maxim Kurnikov
4d4b0003bd
Fix Paginator properties mistyped as Callables ( #193 )
...
Co-authored-by: Nick Sweeting <git@sweeting.me >
2019-09-28 22:16:20 +03:00
Maxim Kurnikov
e143ba568c
add mypy compatibility table ( #190 )
...
* add mypy compatibility table
* add django versions to compatibility table
2019-09-28 22:14:16 +03:00
Maxim Kurnikov
32c0cbca45
add some diagnostic for unused ignores for tests typechecking ( #191 )
2019-09-28 21:38:56 +03:00
Anthony Ricaud
acc3ca4205
Contexts can contain Any data ( #192 )
2019-09-28 21:38:04 +03:00
Maxim Kurnikov
be3fc259d5
fix compatibility with 0.730 ( #189 )
2019-09-28 05:23:55 +03:00
Maxim Kurnikov
7725b416b6
add unused ignores reporting ( #188 )
2019-09-28 04:48:44 +03:00
Maxim Kurnikov
2c23d8e70f
Use runtime information to determine whether class is a models.Model subclass ( #182 )
2019-09-28 04:05:54 +03:00
Anthony Ricaud
5910bd1b25
resolve_template accepts Sequences of str ( #187 )
...
- resolve_template is checking for lists or tuples so let's use a generic Sequence
- Union[Template, Template] seemed redundant
2019-09-25 23:32:23 +03:00
Maxim Kurnikov
963d50c717
add linting stubs with flake8-pyi and check for unused imports ( #186 )
2019-09-25 02:20:23 +03:00
Maxim Kurnikov
7407b93151
Fix type annotations for django.utils.safestring ( #179 )
...
* Add/fix types for django.utils.safestring.mark_safe
Django code ref: 964dd4f4f2/django/utils/safestring.py (L71-L84)
* add generic annotations for mark_safe, remove SafeBytes as it is basically deprecated
Co-authored-by: Daniel Hahler <github@thequod.de >
2019-09-23 21:17:17 +03:00
Daniel Hahler
afcd0d9293
Bump isort, use --diff ( #164 )
...
* dev-requirements: bump isort: 4.3.4 => 4.3.21
* isort: use --diff
* known_first_party = mypy_django_plugin
* Run isort
2019-09-23 20:45:43 +03:00
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
Peter Law
d3dca5b408
related_name is Optional[str] ( #176 )
...
In the current Django (2.1, 2.2), the `related_name` parameter to
`OneToOneField` and `ForeignKey` classes (much like `ManyToManyField`
and the base `ForeignObject` classes) is `Optional[str]`. While
it's true that most authors won't pass `None` here, derived field
types will want to be able to do so.
2019-09-23 17:38:34 +03:00
Peter Law
c69090ec5b
Options.verbose_name_raw is always a string ( #175 )
...
At least in the current implementation.
2019-09-21 16:07:55 +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 Kurnikov
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
Daniel Hahler
e3ea84143f
WIP: fix scripts/typecheck_tests.py ( #162 )
...
* 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
2019-09-14 22:23:45 +03:00
Daniel Hahler
82e3aa5464
ci: minor cleanup ( #161 )
...
* ci: Travis: remove unnecessary option with black
Already in config, adding a final newline there.
* .travis.yml: minor cleanup
2019-09-14 21:49:13 +03:00
Daniel Hahler
5b9a467cf0
flake8: ignore certain errors for .pyi files ( #159 )
2019-09-14 10:52:52 +03:00
Nikita Sobolev
4a4dc53c4d
Adds syntax highlight
2019-09-08 12:31:30 +03:00
Nikita Sobolev
77fd46987d
Adds gitter icon
2019-09-08 12:30:41 +03:00
Nikita Sobolev
9291164a6b
Adds github tempaltes, refs #112 ( #155 )
2019-09-06 09:16:44 +03:00
Wlises R
0c3e06e875
Solve issue 154: Fix wrong type for size in File. ( #156 )
2019-09-06 09:16:19 +03:00
Jared Kerim
b8379d4fe6
Add property to forms.changed_data fixes #148 ( #149 )
2019-08-30 11:18:24 +03:00
Nikita Sobolev
caa0e60743
Fixes travis badge
2019-08-25 20:42:00 +03:00
Maxim Kurnikov
de4fa92441
bump to 1.1.0
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
Nikita Sobolev
ff7bf33e9c
Fixes #127 , adds urls.pyi for several contrib apps ( #129 )
2019-08-16 15:45:17 +03:00
Nikita Sobolev
d94b7b0c6a
Fixes collectstatic storage type, closes #130 ( #131 )
2019-08-16 15:45:07 +03:00
Swen Kooij
7bf1664307
Add properties to runserver.Command ( #135 )
2019-08-16 15:44:49 +03:00
sobolevn
0545c2d3ea
Removes .editorconfig, refs #132
2019-08-13 15:06:13 +03:00
sobolevn
825931da9f
Fixes yaml spacing, refs #132
2019-08-13 15:05:33 +03:00
sobolevn
737fd239b6
Fixes .editorconfig, refs #132
2019-08-13 15:04:02 +03:00
Nikita Sobolev
7f476057b0
Refactors bad default values, now using Ellipsis ( #132 )
...
* Refactors bad default values, now using Ellipsis
* Blacked
2019-08-13 15:01:15 +03:00
Nikita Sobolev
d31512854a
Merge pull request #124 from K0Te/fix-email-annotations
...
Fix EmailMessage.attachements parameter annotation.
2019-08-12 18:46:10 +03:00
Nikita Sobolev
552de422dc
Merge pull request #126 from rik/lazy-translation
...
Improve lazy translation functions
2019-08-12 18:45:15 +03:00
Anthony Ricaud
a9978cc021
Improve lazy translation functions
...
The lazy versions have the same signature as the non-lazy versions
2019-08-09 12:37:17 +01:00