From e07a1afafbc7e030d59ade42b4cd7daf02791d88 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Fri, 26 Jul 2024 10:30:35 -0400 Subject: [PATCH] Fix MyPy complaints due to DM-41326. DM-41326 broke some code here that isn't tested (I want to remove it soon) but is checked by MyPy - but only that only happens in CI when theres' a ctrl_mpexec branch, and there wasn't for that ticket. --- python/lsst/ctrl/mpexec/dotTools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/lsst/ctrl/mpexec/dotTools.py b/python/lsst/ctrl/mpexec/dotTools.py index 97c11b08..a55d2ca0 100644 --- a/python/lsst/ctrl/mpexec/dotTools.py +++ b/python/lsst/ctrl/mpexec/dotTools.py @@ -113,7 +113,7 @@ def _renderQuantumNode( labels = [f"{quantumNode.nodeId}", html.escape(taskDef.label)] dataId = quantumNode.quantum.dataId assert dataId is not None, "Quantum DataId cannot be None" - labels.extend(f"{key} = {dataId[key]}" for key in sorted(dataId.keys())) + labels.extend(f"{key} = {dataId[key]}" for key in sorted(dataId.required.keys())) _renderNode(file, nodeName, "quantum", labels) @@ -128,7 +128,7 @@ def _renderDSTypeNode(name: str, dimensions: list[str], file: io.TextIOBase) -> def _renderDSNode(nodeName: str, dsRef: DatasetRef, file: io.TextIOBase) -> None: """Render GV node for a dataset""" labels = [html.escape(dsRef.datasetType.name), f"run: {dsRef.run!r}"] - labels.extend(f"{key} = {dsRef.dataId[key]}" for key in sorted(dsRef.dataId.keys())) + labels.extend(f"{key} = {dsRef.dataId[key]}" for key in sorted(dsRef.dataId.required.keys())) _renderNode(file, nodeName, "dataset", labels) @@ -144,7 +144,7 @@ def _renderEdge(fromName: str, toName: str, file: io.TextIOBase, **kwargs: Any) def _datasetRefId(dsRef: DatasetRef) -> str: """Make an identifying string for given ref""" dsId = [dsRef.datasetType.name] - dsId.extend(f"{key} = {dsRef.dataId[key]}" for key in sorted(dsRef.dataId.keys())) + dsId.extend(f"{key} = {dsRef.dataId[key]}" for key in sorted(dsRef.dataId.required.keys())) return ":".join(dsId)