Commit d9ff4e5
committed
fix: Import concrete BatchResult
Previously, context.py imported BatchResult from the types module, which
only exposed the Protocol interface with the get_results() method. This
prevented client-side type checkers and IDEs from discovering the full
set of methods available on BatchResult objects returned by map() and
parallel() operations.
Changed to import the concrete BatchResult class from concurrency.models,
which exposes all available methods including:
- throw_if_error()
- succeeded(), failed(), started()
- has_failure, status properties
- success_count, failure_count, started_count properties
- get_errors()
This improves developer experience by providing accurate type hints and
autocomplete for all BatchResult methods without introducing circular
dependencies.1 parent 6ac4feb commit d9ff4e5
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | | - | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
0 commit comments