diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2023-03-03 17:42:32 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-13 14:42:27 +0100 |
commit | f4ea9df0f4ddfc5b46419710e0d4ff02c8b0260f (patch) | |
tree | 68550a1846cc63980301e6d4889b49c9955d1c40 /modules/gdscript/tests/scripts/analyzer/errors | |
parent | acdb1bdbd7aed6442e840074b3a5c09202be6660 (diff) |
Fix GDScript code style regarding colon
(cherry picked from commit ea5fd3d732a85029e8372425904971ad26153ff1)
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/errors')
8 files changed, 13 insertions, 13 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd index 62ac1c3108..900155569c 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd @@ -1,7 +1,7 @@ enum MyEnum { ENUM_VALUE_1, ENUM_VALUE_2 } enum MyOtherEnum { OTHER_ENUM_VALUE_1, OTHER_ENUM_VALUE_2 } -func enum_func(e : MyEnum) -> void: +func enum_func(e: MyEnum) -> void: print(e) func test(): diff --git a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd b/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd index dd2708b21d..63c080e583 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd @@ -4,4 +4,4 @@ func test(): x.free() var ok = x - var bad : Node = x + var bad: Node = x diff --git a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd index 4e75ded96a..c84a4ad8af 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd @@ -2,5 +2,5 @@ enum LocalNamed { VALUE_A, VALUE_B, VALUE_C = 42 } func test(): const P = preload("../features/enum_from_outer.gd") - var x : LocalNamed + var x: LocalNamed x = P.Named.VALUE_A diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd index f1be6aaa0c..35f506aabd 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd @@ -1,7 +1,7 @@ -var _prop : int +var _prop: int # Getter function has wrong return type. -var prop : String: +var prop: String: get = get_prop func get_prop(): diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd index dd190157a1..eedeea915d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd @@ -1,10 +1,10 @@ -var _prop : int +var _prop: int # Setter function has wrong argument type. -var prop : String: +var prop: String: set = set_prop -func set_prop(value : int): +func set_prop(value: int): _prop = value func test(): diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd index 7f2b29222a..90b00fbe13 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd @@ -1,7 +1,7 @@ -var _prop : int +var _prop: int # Inline getter returns int instead of String. -var prop : String: +var prop: String: get: return _prop diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd index 0ce239dbbd..5747b85fc7 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd @@ -1,7 +1,7 @@ -var _prop : int +var _prop: int # Inline setter assigns String to int. -var prop : String: +var prop: String: set(value): _prop = value diff --git a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd b/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd index 758fbaccc9..b0cfdea75d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd @@ -7,4 +7,4 @@ func test(): x.free() var ok = x - var bad : A = x + var bad: A = x |