You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2023/05/07 05:32:33 UTC
[plc4x] 02/03: feat(plc4py): Fix issue with naming of optional enum code-gen
This is an automated email from the ASF dual-hosted git repository.
hutcheb pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 6b5cdf700c5a2e3073ef87c17548120d35749870
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Sun May 7 07:05:04 2023 +0200
feat(plc4py): Fix issue with naming of optional enum code-gen
---
.../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 7d3ec03263..5b882ce5c9 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
@@ -95,7 +95,7 @@ class ${type.name}(Enum):
<#if type.constantNames?has_content>
def __new__(cls, value, <@compress single_line=true>
<#list type.constantNames as constantName>
- ${constantName}
+ ${helper.camelCaseToSnakeCase(constantName)}
<#sep>, </#sep>
</#list>):
</...@compress>