-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[django-filter] Improve constructor param types and add missing re-exports #14556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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