diff --git a/package-parser/package_parser/processing/annotations/_generate_enum_annotations.py b/package-parser/package_parser/processing/annotations/_generate_enum_annotations.py index d5ae11138..f70e8fa2a 100644 --- a/package-parser/package_parser/processing/annotations/_generate_enum_annotations.py +++ b/package-parser/package_parser/processing/annotations/_generate_enum_annotations.py @@ -65,7 +65,7 @@ def _enum_name(parameter_name: str) -> str: def _enum_instance_name(string_value: str) -> str: - segments = re.split(r"[_-]", string_value) + segments = re.split(r"[_\-.]", string_value) result = "_".join( re.sub(r"\W", "", segment).upper() diff --git a/package-parser/tests/data/enums/annotation_data.json b/package-parser/tests/data/enums/annotation_data.json index f9a8ada86..90be550f8 100644 --- a/package-parser/tests/data/enums/annotation_data.json +++ b/package-parser/tests/data/enums/annotation_data.json @@ -54,5 +54,17 @@ "stringValue": "l2" } ] + }, + "test/test/some_global_function/issue_858": { + "target": "test/test/some_global_function/issue_858", + "authors": ["$autogen$"], + "reviewers": [], + "enumName": "Issue858", + "pairs": [ + { + "instanceName": "SAMME_R", + "stringValue": "SAMME.R" + } + ] } } diff --git a/package-parser/tests/data/enums/api_data.json b/package-parser/tests/data/enums/api_data.json index 7be0f532f..09aff082c 100644 --- a/package-parser/tests/data/enums/api_data.json +++ b/package-parser/tests/data/enums/api_data.json @@ -52,6 +52,7 @@ } }, { + "issue": "https://github.com/lars-reimann/api-editor/issues/760", "id": "test/test/some_global_function/issue_760", "name": "issue_760", "qname": "test.some_global_function.issue_760", @@ -59,6 +60,16 @@ "type": "{'l1', 'l2'}, default=None", "description": "" } + }, + { + "issue": "https://github.com/lars-reimann/api-editor/issues/858", + "id": "test/test/some_global_function/issue_858", + "name": "issue_858", + "qname": "test.some_global_function.issue_858", + "docstring": { + "type": "{'SAMME.R'}", + "description": "" + } } ] }