unreal.PyTestTypeHint¶
- class unreal.PyTestTypeHint(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ObjectUsed to verify if the generated Python stub is correctly type-hinted (if type hint is enabled). The stub is generated in the project intermediate folder when the Python developer mode is enabled (Editor preferences). The type hints can be checked in the stub itself or PythonScriptPlugin/Content/Python/test_type_hints.py can be loaded in a Python IDE that supports type checking and look at the code to verify that there is not problems with the types.
C++ Source:
Plugin: PythonScriptPlugin
Module: PythonScriptPlugin
File: PyTest.h
Editor Properties: (see get_editor_property/set_editor_property)
bool_prop(bool): [Read-Write] Check type hinted properties (setter/getter)delegate_prop(PyTestDelegate): [Read-Write]enum_prop(PyTestEnum): [Read-Write]field_path_prop(FieldPath): [Read-Write]float_prop(float): [Read-Write]int_prop(int32): [Read-Write]map_prop(Map[int32, str]): [Read-Write]multicast_delegate_prop(PyTestMulticastDelegate): [Read-Write]name_array_prop(Array[Name]): [Read-Write]name_prop(Name): [Read-Write]object_array_prop(Array[Object]): [Read-Write]object_prop(PyTestObject): [Read-Write]set_prop(Set[str]): [Read-Write]slate_tick_delegate(PyTestSlateTickDelegate): [Read-Write] Members to facilitate testing particular Python API.str_array_prop(Array[str]): [Read-Write]string_prop(str): [Read-Write]struct_prop(PyTestStruct): [Read-Write]text_array_prop(Array[Text]): [Read-Write]text_prop(Text): [Read-Write]
- check_delegate_type_hints(param1) PyTestDelegate¶
Check Delegate Type Hints
- Parameters:
param1 (PyTestDelegate)
- Return type:
- check_enum_type_hints(param1, param2=PyTestEnum.ONE) PyTestEnum¶
Check Enum Type Hints
- Parameters:
param1 (PyTestEnum)
param2 (PyTestEnum)
- Return type:
- check_float_type_hints(param1, param2, param3=-3.300000, param4=4.400000) double¶
Check Float Type Hints
- check_integer_type_hints(param1, param2=4, param3=5) int32¶
Check Integer Type Hints
- Parameters:
param1 (uint8)
param2 (int32)
param3 (int64)
- Return type:
int32
- check_object_type_hints(param1, param4=None) PyTestObject¶
Check Object Type Hints
- Parameters:
param1 (PyTestObject)
param4 (PyTestObject)
- Return type:
- check_struct_type_hints(param1, param2=[False, 0, 0.000000, PyTestEnum.ONE, '', 'None', '', FieldPath(), FieldPath(), [], [], {}, False, None, None]) PyTestStruct¶
Check Struct Type Hints
- Parameters:
param1 (PyTestStruct)
param2 (PyTestStruct)
- Return type:
- classmethod check_tuple_return_type(out_string) -> (int32, out_string=str)¶
Check Tuple Return Type
- property delegate_prop: PyTestDelegate¶
[Read-Write]
- Type:
- property enum_prop: PyTestEnum¶
[Read-Write]
- Type:
- property multicast_delegate_prop: PyTestMulticastDelegate¶
[Read-Write]
- Type:
- property object_prop: PyTestObject¶
[Read-Write]
- Type:
- property slate_tick_delegate: PyTestSlateTickDelegate¶
[Read-Write] Members to facilitate testing particular Python API.
- Type:
- property struct_prop: PyTestStruct¶
[Read-Write]
- Type: