New Year ruff cleanup. (#11595)

This commit is contained in:
comfyanonymous
2026-01-01 19:06:14 -08:00
committed by GitHub
parent 1bdc9a947f
commit 65cfcf5b1b
14 changed files with 35 additions and 22 deletions

View File

@@ -207,15 +207,15 @@ class ExecutionList(TopologicalSort):
return self.output_cache.get(node_id) is not None
def cache_link(self, from_node_id, to_node_id):
if not to_node_id in self.execution_cache:
if to_node_id not in self.execution_cache:
self.execution_cache[to_node_id] = {}
self.execution_cache[to_node_id][from_node_id] = self.output_cache.get(from_node_id)
if not from_node_id in self.execution_cache_listeners:
if from_node_id not in self.execution_cache_listeners:
self.execution_cache_listeners[from_node_id] = set()
self.execution_cache_listeners[from_node_id].add(to_node_id)
def get_cache(self, from_node_id, to_node_id):
if not to_node_id in self.execution_cache:
if to_node_id not in self.execution_cache:
return None
value = self.execution_cache[to_node_id].get(from_node_id)
if value is None: