Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #261 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 226 226
Branches 43 43
=========================================
Hits 226 226 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This comment has been minimized.
This comment has been minimized.
PR Review — improve typehiting belonging to function
|
_wait_one_wait_one
| if coro_fn := next(coro_iter, None): | ||
| this_index += 1 | ||
| exceptions.append(None) | ||
| start_next = loop.create_future() |
There was a problem hiding this comment.
I'm guessing this needs an annotation or something.
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
What do these changes do?
These changes alter the type hinting behavior of
_wait_oneto lessen the confusion as to what exactly the function is doing which is picking an awaitable container to proceed with. AFuture[_T]is then returned rather than just an ordinary object. (Hence my decision of removingAnyall together from thefuturesargument) return value is then set toasyncio.Future[_T]which is the correct object being returned.Are there changes in behavior for the user?
These changes are all internal and only affect the maintainers of this project. My goal of this PR was to lessen the confusion for newer maintainers or users who wish to know what is going on in the code itself. The original type hints were confusing but at the very least correctable.
Related issue number
Checklist