@@ -99,8 +99,8 @@ def _set_inner_edges(self) -> None:
99
99
self ._dot_graph .add_node (n )
100
100
self ._dot_graph .add_edge (
101
101
pydot .Edge (
102
- str (inner_edge_row ["source_step" ]),
103
- str (inner_edge_row ["target_step" ]),
102
+ pydot . quote_id_if_necessary ( str (inner_edge_row ["source_step" ]) ),
103
+ pydot . quote_id_if_necessary ( str (inner_edge_row ["target_step" ]) ),
104
104
)
105
105
)
106
106
@@ -109,7 +109,6 @@ def _set_input_edges(self) -> None:
109
109
inputs_subgraph = pydot .Subgraph (graph_name = "cluster_inputs" )
110
110
self ._dot_graph .add_subgraph (inputs_subgraph )
111
111
inputs_subgraph .set ("rank" , "same" )
112
- inputs_subgraph .create_attribute_methods (["style" ])
113
112
inputs_subgraph .set ("style" , "dashed" )
114
113
inputs_subgraph .set ("label" , "Workflow Inputs" )
115
114
@@ -129,14 +128,18 @@ def _set_input_edges(self) -> None:
129
128
)
130
129
n .set_name (str (input_row ["input" ]))
131
130
inputs_subgraph .add_node (n )
132
- self ._dot_graph .add_edge (pydot .Edge (str (input_row ["input" ]), str (input_row ["step" ])))
131
+ self ._dot_graph .add_edge (
132
+ pydot .Edge (
133
+ pydot .quote_id_if_necessary (str (input_row ["input" ])),
134
+ pydot .quote_id_if_necessary (str (input_row ["step" ])),
135
+ )
136
+ )
133
137
134
138
def _set_output_edges (self ) -> None :
135
139
get_output_edges = _get_output_edges_query ()
136
140
outputs_graph = pydot .Subgraph (graph_name = "cluster_outputs" )
137
141
self ._dot_graph .add_subgraph (outputs_graph )
138
142
outputs_graph .set ("rank" , "same" )
139
- outputs_graph .create_attribute_methods (["style" ])
140
143
outputs_graph .set ("style" , "dashed" )
141
144
outputs_graph .set ("label" , "Workflow Outputs" )
142
145
outputs_graph .set ("labelloc" , "b" )
@@ -156,7 +159,12 @@ def _set_output_edges(self) -> None:
156
159
)
157
160
n .set_name (str (output_edge_row ["output" ]))
158
161
outputs_graph .add_node (n )
159
- self ._dot_graph .add_edge (pydot .Edge (output_edge_row ["step" ], output_edge_row ["output" ]))
162
+ self ._dot_graph .add_edge (
163
+ pydot .Edge (
164
+ pydot .quote_id_if_necessary (output_edge_row ["step" ]),
165
+ pydot .quote_id_if_necessary (output_edge_row ["output" ]),
166
+ )
167
+ )
160
168
161
169
def _get_root_graph_uri (self ) -> rdflib .term .Identifier :
162
170
get_root_query = _get_root_query ()
0 commit comments