-
Notifications
You must be signed in to change notification settings - Fork 213
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
Add type annotations to asgiref functions #429
base: main
Are you sure you want to change the base?
Conversation
Looks like you've got some work to do to make the tests and the linter happy! I'd recommend running them locally; GitHub won't run them for you on every commit because you're a first-time contributor. |
all 3 tests passed locally |
Unfortunately the tests passing locally isn't enough - we have a very particular CI setup because asgiref is incredibly hard to test correctly. If you're not already running it, I might recommend running the tests via |
Right, there is no problem. I will go ahead with |
Unfortunately mypy is exactly what you need to satisfy; there's a reason some of this typing hasn't been done - it's very complex to type correctly, as you can see! |
Will continue working on it till it passes the test. |
This tends to pass mypy test but tox finds some faults in the test_compatibility.py |
I am also interested in getting type annotations added to I'm not experienced enough with Github to know how best to contribute to a PR already in progress (should I just open another one?) but the code is there if @davitacols is interested in integrating it into this PR. |
I am so glad to hear about such a progress. Moreover, you can post the compatibilty.py code here in the comment or you can make a fresh PR to my original PR. |
Changes Made
is_double_callable
function.double_to_single_callable
andguarantee_single_callable
functions.Why
Refactored the code to enhance readability and maintainability. The changes aim to improve understanding and make the codebase more consistent.
Checklist
Notes for Reviewers
Please review for clarity and consistency. No functional changes were introduced; the focus is on code organization and readability.