Substitute a dependency with a new value. The new value either has to be a new valid key or a GraphNode to replace the dependency entirely. The GraphNode will not be mutated but instead a shallow copy will be returned. The substitution will be performed eagerly. Par
(
self, subs: dict[KeyType, KeyType | GraphNode], key: KeyType | None = None
)
| 427 | ) |
| 428 | |
| 429 | def substitute( |
| 430 | self, subs: dict[KeyType, KeyType | GraphNode], key: KeyType | None = None |
| 431 | ) -> GraphNode: |
| 432 | """Substitute a dependency with a new value. The new value either has to |
| 433 | be a new valid key or a GraphNode to replace the dependency entirely. |
| 434 | |
| 435 | The GraphNode will not be mutated but instead a shallow copy will be |
| 436 | returned. The substitution will be performed eagerly. |
| 437 | |
| 438 | Parameters |
| 439 | ---------- |
| 440 | subs : dict[KeyType, KeyType | GraphNode] |
| 441 | The mapping describing the substitutions to be made. |
| 442 | key : KeyType | None, optional |
| 443 | The key of the new GraphNode object. If None provided, the key of |
| 444 | the old one will be reused. |
| 445 | """ |
| 446 | raise NotImplementedError |
| 447 | |
| 448 | @staticmethod |
| 449 | def fuse(*tasks: GraphNode, key: KeyType | None = None) -> GraphNode: |
nothing calls this directly
no outgoing calls
no test coverage detected