Skip to content

Commit 41c8a44

Browse files
committed
Try getattr in template
1 parent 5e6179c commit 41c8a44

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ansys/dpf/core/operators/operator.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,14 @@ class Inputs{{capital_class_name}}(_Inputs):
211211

212212
{{/input_pins}}
213213

214+
def __getattr__(self, name):
215+
{{#input_pins}}
216+
{{#has_aliases}}
217+
if name in {{{aliases}}}:
218+
return self.{{name}}
219+
{{/has_aliases}}
220+
{{/input_pins}}
221+
214222

215223
class Outputs{{capital_class_name}}(_Outputs):
216224
"""Intermediate class used to get outputs from

0 commit comments

Comments
 (0)