summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/utils.notest.gd
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-19 11:21:00 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-19 11:21:00 +0200
commit6761923f4f90c9f564e94e6845471d504d5f63f1 (patch)
tree4f045525c02757278c1c3ff4e595598fffd488e0 /modules/gdscript/tests/scripts/utils.notest.gd
parentf58a96cfa20530268a9b35efc8cd7ddad1900a8b (diff)
parent76b2d85c9fb10426fad78a8d2dbafd8ca08a4b89 (diff)
downloadredot-engine-6761923f4f90c9f564e94e6845471d504d5f63f1.tar.gz
Merge pull request #90716 from dalexeev/gds-fix-export-annotation-issues
GDScript: Fix some export annotation issues
Diffstat (limited to 'modules/gdscript/tests/scripts/utils.notest.gd')
-rw-r--r--modules/gdscript/tests/scripts/utils.notest.gd15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/gdscript/tests/scripts/utils.notest.gd b/modules/gdscript/tests/scripts/utils.notest.gd
index 1cf46c179e..7fdd6556ec 100644
--- a/modules/gdscript/tests/scripts/utils.notest.gd
+++ b/modules/gdscript/tests/scripts/utils.notest.gd
@@ -55,18 +55,18 @@ static func get_human_readable_hint_string(property: Dictionary) -> String:
if elem_type_hint.is_valid_int():
elem_type = elem_type_hint.to_int()
- type_hint_prefixes += type_string(elem_type) + ":"
+ type_hint_prefixes += "<%s>:" % type_string(elem_type)
else:
if elem_type_hint.count("/") != 1:
push_error("Invalid PROPERTY_HINT_TYPE_STRING format.")
elem_type = elem_type_hint.get_slice("/", 0).to_int()
elem_hint = elem_type_hint.get_slice("/", 1).to_int()
- type_hint_prefixes += "%s/%s:" % [
- type_string(elem_type),
- get_property_hint_name(elem_hint).trim_prefix("PROPERTY_HINT_"),
+ type_hint_prefixes += "<%s>/<%s>:" % [
+ type_string(elem_type),
+ get_property_hint_name(elem_hint).trim_prefix("PROPERTY_HINT_"),
]
- if elem_type < TYPE_ARRAY:
+ if elem_type < TYPE_ARRAY or hint_string.is_empty():
break
return type_hint_prefixes + hint_string
@@ -76,10 +76,11 @@ static func get_human_readable_hint_string(property: Dictionary) -> String:
static func print_property_extended_info(property: Dictionary, base: Object = null, is_static: bool = false) -> void:
print(get_property_signature(property, base, is_static))
- print(' hint=%s hint_string="%s" usage=%s' % [
+ print(' hint=%s hint_string="%s" usage=%s class_name=&"%s"' % [
get_property_hint_name(property.hint).trim_prefix("PROPERTY_HINT_"),
- get_human_readable_hint_string(property),
+ get_human_readable_hint_string(property).c_escape(),
get_property_usage_string(property.usage).replace("PROPERTY_USAGE_", ""),
+ property.class_name.c_escape(),
])