(
self, subs: dict[KeyType, KeyType | GraphNode], key: KeyType | None = None
)
| 877 | return f"{type(self).__name__}({self.args})" |
| 878 | |
| 879 | def substitute( |
| 880 | self, subs: dict[KeyType, KeyType | GraphNode], key: KeyType | None = None |
| 881 | ) -> NestedContainer: |
| 882 | subs_filtered = { |
| 883 | k: v for k, v in subs.items() if k in self.dependencies and k != v |
| 884 | } |
| 885 | if not subs_filtered: |
| 886 | return self |
| 887 | return type(self)( |
| 888 | *( |
| 889 | ( |
| 890 | a.substitute(subs_filtered) |
| 891 | if isinstance(a, (GraphNode, TaskRef)) |
| 892 | else a |
| 893 | ) |
| 894 | for a in self.args |
| 895 | ) |
| 896 | ) |
| 897 | |
| 898 | def __dask_tokenize__(self): |
| 899 | from dask.tokenize import tokenize |
nothing calls this directly
no test coverage detected