This is an automated email from the ASF dual-hosted git repository.

hutcheb pushed a commit to branch plc4py/integration-test
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 673fb6af29cd764dc98ec514b1c5c7f867e9387e
Author: Ben Hutcheson <ben.hut...@gmail.com>
AuthorDate: Tue May 7 04:21:10 2024 +0200

    fix(plc4py): Fix enums with parameters
---
 .../src/main/resources/templates/python/enum-template.python.ftlh       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/code-generation/language-python/src/main/resources/templates/python/enum-template.python.ftlh
 
b/code-generation/language-python/src/main/resources/templates/python/enum-template.python.ftlh
index a82bf2438a..f418d49683 100644
--- 
a/code-generation/language-python/src/main/resources/templates/python/enum-template.python.ftlh
+++ 
b/code-generation/language-python/src/main/resources/templates/python/enum-template.python.ftlh
@@ -83,7 +83,7 @@ class ${type.name}(AutoNumberEnum):
                         <#if 
helper.escapeValue(type.getConstantType(constantName), 
enumValue.getConstant(constantName).orElse(null)) == 'null'>
                             = None
                         <#elseif 
type.getConstantType(constantName).isEnumTypeReference()>
-                            = 
${helper.getLanguageTypeNameForTypeReference(type.getConstantType(constantName),
 true)}.${helper.escapeValue(type.getConstantType(constantName), 
enumValue.getConstant(constantName).orElseThrow())}<#else>${helper.getLanguageTypeNameForTypeReference(type.getConstantType(constantName),
 true)}(${helper.escapeValue(type.getConstantType(constantName), 
enumValue.getConstant(constantName).orElseThrow())})</#if><#else>${helper.getLanguageTypeNameForTypeReference(type
 [...]
+                            
${helper.getLanguageTypeNameForTypeReference(type.getConstantType(constantName),
 true)}.${helper.escapeValue(type.getConstantType(constantName), 
enumValue.getConstant(constantName).orElseThrow())}<#else>${helper.getLanguageTypeNameForTypeReference(type.getConstantType(constantName),
 true)}(${helper.escapeValue(type.getConstantType(constantName), 
enumValue.getConstant(constantName).orElseThrow())})</#if><#else>${helper.getLanguageTypeNameForTypeReference(type.g
 [...]
                         </#if>
                     <#sep>, </#sep>
                 </#list>

Reply via email to