def _create_constant_info(self): data_type = BuiltinDataType("int") info = VariableInfo("constant") info.set_name("constant_1") info.set_description("constant_1 description") info.set_module("module_1") info.set_data_type(data_type) return info
def _create_class_info(self): info = ClassInfo() info.set_name("ClassA") info.set_module("module_1") info.set_description("ClassA description") data_type_1 = BuiltinDataType("str") data_type_2 = CustomDataType("custom_data_type", modifier="set") mixin_data_type = MixinDataType([data_type_1, data_type_2]) attr_info_1 = VariableInfo("attribute") attr_info_1.set_name("attr_1") attr_info_1.set_description("attr_1 description") attr_info_1.set_data_type(mixin_data_type) attr_info_1.set_class("ClassA") attr_info_1.set_module("module_1") info.set_attributes([attr_info_1]) method_info_1 = FunctionInfo("method") method_info_1.set_name("method_1") method_info_1.set_parameters(["param_1"]) method_info_1.set_description("method_1 description") method_info_1.set_module("module_1") method_info_1.set_class("ClassA") param_data_type_1 = BuiltinDataType("int") param_info_1 = ParameterDetailInfo() param_info_1.set_name("param_1") param_info_1.set_description("param_1 description") param_info_1.set_data_type(param_data_type_1) method_info_1.add_parameter_detail(param_info_1) info.set_methods([method_info_1]) base_class_1 = CustomDataType("BaseClassA") base_class_2 = CustomDataType("BaseClassB") info.add_base_classes([base_class_1, base_class_2]) return info