(future: "Future[_T]")
| 152 | """ |
| 153 | |
| 154 | def copy(future: "Future[_T]") -> None: |
| 155 | assert future is a |
| 156 | if b.done(): |
| 157 | return |
| 158 | if hasattr(a, "exc_info") and a.exc_info() is not None: # type: ignore |
| 159 | future_set_exc_info(b, a.exc_info()) # type: ignore |
| 160 | elif a.exception() is not None: |
| 161 | b.set_exception(a.exception()) |
| 162 | else: |
| 163 | b.set_result(a.result()) |
| 164 | |
| 165 | if isinstance(a, Future): |
| 166 | future_add_done_callback(a, copy) |
nothing calls this directly
no test coverage detected