Maksim Kurnikov
49ed9c957f
Merge pull request #536 from wkschwartz/patch-1
...
Fix incorrect and add missing annotations for loaddata command
2021-01-20 02:31:04 +03:00
Maksim Kurnikov
4829ce2200
Merge pull request #510 from jpulec/patch-1
...
Add resolve_callables to db.models.utils (Django 3.1)
2021-01-20 02:20:35 +03:00
Maksim Kurnikov
9fe1a76779
Merge pull request #559 from mkurnikov/value-to-string
...
add value_to_string method to Field
2021-01-20 02:18:20 +03:00
Maksim Kurnikov
153613eddb
run black
2021-01-20 02:11:37 +03:00
Maksim Kurnikov
b6cb50e729
Merge pull request #538 from bullfest/av/ModelMultipleChoiceField
...
Make queryset parameter to ModelMultipleChoiceField.__init__ Optional
2021-01-20 02:02:01 +03:00
Maksim Kurnikov
344dea06b5
value_to_string obj param is Model
2021-01-20 01:58:29 +03:00
Maksim Kurnikov
01a9ad12e1
Merge pull request #533 from woochica/master
...
Add support for PositiveBigIntegerField (Django 3.1)
2021-01-20 00:19:13 +03:00
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
Maxim Kurnikov
1af3a12f2c
bump to 1.5.0
2020-03-15 00:59:58 +03:00
Maksim Kurnikov
cb123de105
BaseManager.from_queryset(): properly resolve methods for QuerySet defined in another file ( #282 )
...
* BaseManager.from_queryset() from another file
* only anal_type per argument
* add resolve for return_type
* fix mypy errors
* remove leftover comment
2019-12-18 20:01:20 +03:00
Maksim Kurnikov
38135f2d1f
Merge pull request #281 from mkurnikov/update-deps
...
Update dev deps, mypy to 0.760
2019-12-18 00:13:11 +03:00
Maxim Kurnikov
998b659749
bump to 1.4.0
2019-12-18 00:03:29 +03:00
Maxim Kurnikov
72f69e1c5e
remove unused ignores
2019-12-18 00:02:55 +03:00
Maxim Kurnikov
d666ecd36f
update dev deps, mypy to 0.760
2019-12-17 23:50:50 +03:00
Maksim Kurnikov
c1af26c027
handle return value of anal_type properly ( #280 )
2019-12-17 23:36:44 +03:00
Maxim Kurnikov
3c3dfcbc9f
bump to 1.3.3
2019-12-17 19:20:27 +03:00
Maksim Kurnikov and Boger
1196336e3b
Perform anal_type for arguments and return type when copying methods to another class ( #279 )
...
* Found the reproducible test case
* fix import resolution for method copy
* remove irrelevant parts from test
* fix mypy errors
Co-authored-by: Boger <kotvberloge@gmail.com >
2019-12-17 19:19:31 +03:00
Maksim Kurnikov
665f4d8ea1
Make related manager inherit from objects of related model ( #278 )
...
* related manager inherits from objects of related model
* fix test typechecking
* lint
2019-12-17 19:06:27 +03:00
Maxim Kurnikov
f7e1cfc6c7
bump to 1.3.2
2019-12-13 23:55:08 +03:00
Maksim Kurnikov
d0c25e3bce
Allow to run from_queryset() with BaseManager, Manager ( #271 )
...
* allow to run from_queryset() with BaseManager, Manager
* fix tests
2019-12-13 20:16:33 +03:00
Maksim Kurnikov
1c31e71ffc
enable 'model_forms' for tests typechecking ( #270 )
2019-12-13 13:30:21 +03:00
Maksim Kurnikov
5832605053
Remove warning about unsupported expression types ( #266 )
...
* remove warning about unsupported expression for _meta.get_field()
* lint
2019-12-12 08:20:52 +03:00
Maksim Kurnikov
31e795016f
values(), values_list() with ManyToManyField ( #267 )
2019-12-12 08:09:47 +03:00
Maxim Kurnikov
0cba3f9fd6
bump to 1.3.1
2019-12-12 08:03:47 +03:00
Maksim Kurnikov
f02050911f
various annotation improvements ( #258 )
2019-12-12 06:42:29 +03:00
Maksim Kurnikov
ade48b6546
Add support for BaseManager.from_queryset() ( #251 )
...
* add support for BaseManager.from_queryset()
* cleanups
* lint fixes
2019-12-12 05:35:56 +03:00
Maksim Kurnikov
b8f29027d8
Suppress IncompleteDefnException on final_iteration and continue with the loop ( #260 )
...
* suppress IncompleteDefnException on final_iteration
* lint
2019-12-12 01:04:24 +03:00
Maksim Kurnikov
5a45544e76
Optimize tests typechecking script ( #255 )
...
* skip whole Django repo for tests typechecking
* lint
2019-12-11 00:52:08 +03:00
Maksim Kurnikov
8c2de7da56
add a number of django test directories for typecheck ( #257 )
2019-12-11 00:51:32 +03:00
Maksim Kurnikov
d43c6dc7e2
Merge pull request #254 from mkurnikov/better-force-text-types
...
Better types for django.utils.encoding
2019-12-10 23:36:38 +03:00
Maxim Kurnikov
f7e2109e06
add @overload clauses to smart_text, smart_bytes, force_bytes
2019-12-10 23:22:23 +03:00
Maxim Kurnikov
540e28f4c6
bump version to 1.3.0
2019-12-06 23:37:19 +03:00
Maksim Kurnikov
4ac43c6ed6
Add Django 3.0 testing to CI ( #246 )
...
* add Django 3.0 testing to CI
* remove importlib_metadata usage
* conditionally load choices module for tests
2019-12-06 23:36:24 +03:00
Maksim Kurnikov
cadd6c963b
fix model's on_cascade= parameter for test, update to latest gdal ( #247 )
2019-12-06 03:40:55 +03:00
Maksim Kurnikov
f824003cc4
remove unused ignore pattern ( #239 )
2019-12-01 00:09:36 +03:00
Maksim Kurnikov
cbb6a7a9ac
Merge pull request #238 from mkurnikov/mypy-750
...
Mypy 0.750 support
2019-11-30 22:27:50 +03:00
Maxim Kurnikov
2c4827bbaf
properly change type of self for methods on custom manager classes
2019-11-30 22:08:16 +03:00
Maxim Kurnikov
5a151bf851
update django tests branch
2019-11-30 20:56:31 +03:00
Maksim Kurnikov
8343d76895
Fix has_perm() methods for auth backend, and for contrib.auth.models ( #232 )
...
* fix has_perm() methods
* lint
2019-11-19 04:54:17 +03:00
Maksim Kurnikov
8d986a0f43
remove catch-all __getattr__ for Manager, fix some issues with manager methods ( #227 )
2019-11-12 20:36:07 +03:00
Maksim Kurnikov
287c64d6fb
Pin to 0.740 and fix CI ( #225 )
...
* update django sources
* pin mypy version, update to 0.740
* fix tests typechecking
* fix lint
2019-11-12 05:17:36 +03:00
Maxim Kurnikov
8402e7c53e
improve annotations in some places ( #202 )
...
* improve annotations in some places
* linting
2019-10-07 14:50:45 +03:00
Maxim Kurnikov
dceb075152
fix annotation for BaseCommand.handle() ( #201 )
2019-10-05 21:36:41 +03:00
Maxim Kurnikov
7e3f4bfa02
Fix ForeignKey type for self-reference defined in the abstract model ( #200 )
2019-10-05 21:36:29 +03:00
Maxim Kurnikov
db9ff6aaf6
Fix crash if model from same app referenced in RelatedField cannot be resolved ( #199 )
...
* do not crash if model from same app refd in ForeignKey cannot be resolved
* bump to 1.2.0
2019-10-05 20:00:51 +03:00
Maxim Kurnikov
717be5940f
Reorganize code a bit, add current directory to sys.path ( #198 )
...
* reorganize code a bit
* add current directory to sys.path
* remove PYTHONPATH mention from the docs
* linting
2019-10-05 19:44:29 +03:00
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 and Nick Sweeting
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
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
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 and Daniel Hahler
7407b93151
Fix type annotations for django.utils.safestring ( #179 )
...
* Add/fix types for django.utils.safestring.mark_safe
Django code ref: https://github.com/django/django/blob/964dd4f4f208722d8993a35c1ff047d353cea1ea/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
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 Kurnikov and Daniel 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