Check if obj is a dask Future (TaskRef or duck-typed with __dask_future__). This supports both distributed.Future (which inherits from TaskRef) and third-party scheduler futures that set __dask_future__ = True.
(obj: object)
| 367 | |
| 368 | |
| 369 | def _is_dask_future(obj: object) -> bool: |
| 370 | """Check if obj is a dask Future (TaskRef or duck-typed with __dask_future__). |
| 371 | |
| 372 | This supports both distributed.Future (which inherits from TaskRef) and |
| 373 | third-party scheduler futures that set __dask_future__ = True. |
| 374 | """ |
| 375 | return isinstance(obj, TaskRef) or getattr(obj, "__dask_future__", False) |
| 376 | |
| 377 | |
| 378 | class GraphNode: |
no outgoing calls
no test coverage detected
searching dependent graphs…