channels_redis
channels_redis copied to clipboard
FEAT: type hint
https://github.com/django/channels_redis/issues/412
i'm yet to take a good look at this PR just like to mention that redis-py has wrong type hints so it shouldn't be used as guide to type hint this package
@amirreza8002 thanks for your review. I will do without redis-py!
best
hi @bigfootjon sorry for the ping since django is now python >= 3.10, is there any plans to move this package to >=3.10 as well? if so we could drop a lot of old syntax and take advantage of the newer typing supports
Sorry for the slow reply, 2 major pieces of feedback:
- We need some kind of CI on these changes. Something like how asgiref does it: https://github.com/django/asgiref/blob/main/tox.ini#L11
- This PR should ONLY add type-hints, please revert all other changes like the
xfailremovals
Sorry for the slow reply, 2 major pieces of feedback:
- We need some kind of CI on these changes. Something like how asgiref does it: https://github.com/django/asgiref/blob/main/tox.ini#L11
- This PR should ONLY add type-hints, please revert all other changes like the
xfailremovals
@amirreza8002 @bigfootjon Thanks for replying.
The xfail fix has been reverted. The import order has been corrected. mypy ci has been introduced. Any has been used where necessary to reduce the number of error messages in mypy results.
@amirreza8002 @bigfootjon I fixed fail of CI.
Could you approve workflow awaiting?
@carltongibson thanks for approve workflow.
All tests were successful, but only the package dependency resolution error failed. I have resolved the conflict with the main branch. Can you approve the side workflow?
i should clarify that i am not a maintainer here, only an interested passer-by
i would note that since channels-redis is now python >= 3.9, we can get rid of typing.Dict and simply use dict (same goes forlist and the like)