Skip to content

Commit 7b006e5

Browse files
authored
Merge pull request #184 from jmchilton/fix_merge_problem
Fix merge issue.
2 parents 44bc960 + 382c7b3 commit 7b006e5

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

gxformat2/mermaid/_builder.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import Any
77

88
from gxformat2.normalized import ensure_format2, NormalizedFormat2
9-
from gxformat2.schema.gxformat2 import FrameComment, GalaxyWorkflow, WorkflowInputParameter
9+
from gxformat2.schema.gxformat2 import BaseInputParameter, FrameComment, GalaxyWorkflow
1010

1111
# Standard Mermaid shape wrappers: (open, close) bracket pairs.
1212
# >label] = asymmetric / flag (inputs)
@@ -41,14 +41,15 @@ def _sanitize_label(label: str) -> str:
4141
return label
4242

4343

44-
def _input_type_str(inp: WorkflowInputParameter) -> str:
45-
if inp.type_ is None:
44+
def _input_type_str(inp: BaseInputParameter) -> str:
45+
type_ = getattr(inp, "type_", None)
46+
if type_ is None:
4647
return "input"
47-
if isinstance(inp.type_, list):
48-
if inp.type_:
49-
return inp.type_[0].value
48+
if isinstance(type_, list):
49+
if type_:
50+
return type_[0].value
5051
return "input"
51-
return inp.type_.value
52+
return type_.value
5253

5354

5455
def _node_line(node_id: str, label: str, shape: tuple[str, str]) -> str:

0 commit comments

Comments
 (0)