[django-filter] Improve constructor param types and add missing re-exports#14556
[django-filter] Improve constructor param types and add missing re-exports#14556srittau merged 1 commit intopython:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
Just a quick note — it’s generally a good practice to add a comment for each use of |
srittau
left a comment
There was a problem hiding this comment.
LGTM, but one question below.
|
Thanks, I'll find the time some day to fix CI errors and resolve review comments.
👍 I will convert them to |
63a8427 to
5ca265b
Compare
This comment has been minimized.
This comment has been minimized.
…ports * Accept `StrOrPromise` for field labels -- allow Django lazy translated strings. * Added `__init__` params that are inherited from parent classes. Reduced usage of loosely typed `*args, **kwargs`. * Removed `__init__` method type hints from classes whose parameters are same as parent class -- to avoid duplicating them. * Added missing re-exports to `django_filters/rest_framework/__init__.pyi` -- the imports in this file are clearly meant as re-export
5ca265b to
014fff7
Compare
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
Tests fixed -- restored the |
This is all I found that could be improved in #14540. FYI @huynguyengl99
StrOrPromisefor field labels -- allow Django lazy translated strings.__init__params that are inherited from parent classes. Reduced usage of loosely typed*args, **kwargs.__init__method type hints from classes whose parameters are same as parent class -- to avoid duplicating them.django_filters/rest_framework/__init__.pyi-- the imports in this file are clearly meant as re-export