-
-
Notifications
You must be signed in to change notification settings - Fork 143
Just a concept of gather-like method #1966
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
returns/methods/gather.py
Outdated
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.
you can use a dict[int, IOResult[R, E]] here instead. Where int is the index of the running task.
returns/methods/gather.py
Outdated
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.
and return a tuple sorted by keys of the this dict.
tests/test_methods/test_gather.py
Outdated
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.
This should not be possible. You cannot mix Future and FutureResult in one operation without an explicit cast.
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.
(from mypy's point of view, I mean)
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.
It is not supposed to mix IO operations that can and can not fail? Or it is just mypy limitation?
returns/methods/__init__.py
Outdated
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.
Let's create a new file: async_.py and put it there.
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.
Is naming of the method good(gather)?
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.
yeap
Co-authored-by: sobolevn <mail@sobolevn.me>
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 100.00%. Comparing base (
82ef3ef) to head (5bab4bc).
Report is 317 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #1966 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 80 82 +2 Lines 2485 2592 +107 Branches 437 45 -392 ========================================== + Hits 2485 2592 +107
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Before processing further, here a little snippet how it could look like.
CHANGELOG.md🙏 Please, if you or your company finds
dry-pythonvaluable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.