Seth Yastrov
86c63d790b
Fix type errors on other models' managers when using objects = models.Manager() in Model. ( #34 )
...
* Fix bug where models with a class variable using a manager defined would interfere with other managers.
- Fill in the type argument for that particular instance of the manager, rather than modifying the bases of the Manager type.
- Instantiate a new Instance from determine_proper_manager_type so The code doesn't crash under mypy-mypyc.
* Use helpers.reparametrize_instance per review comment.
* Updated ignored errors in Django test for get_objects_or_404.
- For some reason, `Manager[nothing]` is now removed from expected types.
However, I think this makes sense anyway, as Manager is a subclass of QuerySet.
2019-03-08 12:30:38 +03:00
Maxim Kurnikov
c962b8ac68
attempt to add flake8 and isort
2019-03-01 02:07:53 +03:00
Maxim Kurnikov
df5c70c703
fixes for FormMixin's get_form/get_form_class
2019-02-25 04:01:36 +03:00
Maxim Kurnikov
dacf88c692
optimize hooks a bit
2019-02-22 00:12:23 +03:00
Maxim Kurnikov
14ea848dd7
add nested Meta inheritance support for forms
2019-02-20 21:52:28 +03:00
Maxim Kurnikov
e9f9202ed1
preliminary support for strict_optional
2019-02-17 18:07:53 +03:00
Maxim Kurnikov
c382d6aa2f
fix redefining field with name id with different than int type
2019-02-15 21:54:40 +03:00
Maxim Kurnikov
c1640b619f
fix stale import
2019-02-14 03:21:11 +03:00
Maxim Kurnikov
a08ad80a0d
fix star import parsing for settings
2019-02-14 03:16:07 +03:00
Maxim Kurnikov
f30cd092f1
add default for MYPY_DJANGO_CONFIG
2019-02-13 23:02:49 +03:00
Maxim Kurnikov
26a80a8279
add properly typed FOREIGN_KEY_FIELD_NAME_id fields to models
2019-02-13 21:05:02 +03:00
Maxim Kurnikov
79ebe20f2e
add more test folders
2019-02-13 19:44:25 +03:00
Maxim Kurnikov
70378b8f40
preserve fallback to Any for unrecognized field types for init/create
2019-02-13 17:00:35 +03:00
Maxim Kurnikov
b7f7713c5a
add support for get_user_model(), fixes #16
2019-02-13 15:56:21 +03:00
Maxim Kurnikov
9eb95fbab3
add BaseManager.create() typechecking
2019-02-12 03:54:48 +03:00
Maxim Kurnikov
6b7507206a
fix couple edge cases with __init__
2019-02-10 04:32:27 +03:00
Maxim Kurnikov
5f6f597266
add config file support
2019-02-09 03:21:49 +03:00
Maxim Kurnikov
916df1efb6
add Model.__init__ typechecking
2019-02-08 17:16:03 +03:00
Maxim Kurnikov
d4cb729c93
rework settings, add loading of the django.conf.global_settings, cleanups
2019-02-07 19:13:39 +03:00
Maxim Kurnikov
77aba97bdc
remove legacy monkeypatch
2019-01-22 20:12:36 +03:00
Maxim Kurnikov
4f33f28ba2
fix tests
2019-01-22 19:30:09 +03:00
Maxim Kurnikov
3c3e9305f4
add support for Apps.get_model for migrations
2018-12-21 01:17:47 +03:00
Maxim Kurnikov
094b8421ab
move to plugin common api, move to new functioncontext api
2018-12-19 02:41:28 +03:00
Maxim Kurnikov
c9ad40d7e3
add support for managers as generics
2018-12-07 22:11:22 +03:00
Maxim Kurnikov
3676cb3ac0
solve more use cases for related managers and settings
2018-12-03 01:57:46 +03:00
Maxim Kurnikov
fcd659837e
cleanups, fix settings
2018-12-01 16:26:53 +03:00
Maxim Kurnikov
60b1c48ade
nested class Meta support
2018-11-30 14:00:11 +03:00
Maxim Kurnikov
64bc053056
move to custom pytest plugin test runner, fix tests, add Any fallback to ForeignKey
2018-11-28 00:37:04 +03:00
Maxim Kurnikov
f59cfe6371
latest changes
2018-11-26 23:58:34 +03:00
Maxim Kurnikov
06bb3cd50b
add support for django.conf.settings.SETTING_NAME
2018-11-18 15:58:17 +03:00