Skip to content

Commit 8416d60

Browse files
authored
Fix inline subworkflow inputs codegen (#3371)
* Fix inline subworkflow inputs codegen * Fix module path
1 parent 0cc510b commit 8416d60

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

ee/codegen/src/__test__/nodes/__snapshots__/inline-subworkflow-node.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ class MyNode1Display(BaseTemplatingNodeDisplay[MyNode1]):
159159
`;
160160

161161
exports[`InlineSubworkflowNode > with state > inline subworkflow node file with state should include all three generic type parameters 1`] = `
162-
"from vellum.workflows.nodes.displayable import InlineSubworkflowNode as BaseInlineSubworkflowNode
162+
"from vellum.workflows.inputs import BaseInputs
163+
from vellum.workflows.nodes.displayable import InlineSubworkflowNode as BaseInlineSubworkflowNode
163164
from vellum.workflows.state import BaseState
164165
165-
from .inputs import Inputs
166166
from .workflow import InlineSubworkflowNodeWorkflow
167167
from ...state import State
168168
169169
170-
class InlineSubworkflowNode(BaseInlineSubworkflowNode[State, Inputs, BaseState]):
170+
class InlineSubworkflowNode(BaseInlineSubworkflowNode[State, BaseInputs, BaseState]):
171171
subworkflow = InlineSubworkflowNodeWorkflow
172172
"
173173
`;

ee/codegen/src/generators/nodes/inline-subworkflow-node.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ export class InlineSubworkflowNode extends BaseNestedWorkflowNode<
3535
// InputsType: Reference to the Inputs class from the nested workflow
3636
const inputsType = python.Type.reference(
3737
new Reference({
38-
name: "Inputs",
39-
modulePath: [
40-
...nestedWorkflowContext.modulePath.slice(0, -1),
41-
"inputs",
42-
],
38+
name: "BaseInputs",
39+
modulePath: nestedWorkflowContext.sdkModulePathNames.INPUTS_MODULE_PATH,
4340
})
4441
);
4542

0 commit comments

Comments
 (0)