File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -201,14 +201,24 @@ std::string FunctionDoc::ToGoogleDocString() const {
201
201
for (size_t i = 0 ; i < overload.argument_docs_ .size (); ++i) {
202
202
const ArgumentDoc& argument_doc = overload.argument_docs_ [i];
203
203
rc << argument_doc.name_ ;
204
+ if (argument_doc.type_ != " " ) {
205
+ rc << " : " << argument_doc.type_ ;
206
+ }
204
207
if (argument_doc.default_ != " " ) {
205
- rc << " = " << argument_doc.default_ ;
208
+ rc << " = " << argument_doc.default_ ;
206
209
}
207
210
if (i != overload.argument_docs_ .size () - 1 ) {
208
211
rc << " , " ;
209
212
}
210
213
}
211
- rc << " )" << std::endl;
214
+ rc << " )" ;
215
+
216
+ // Return type
217
+ if (overload.return_doc_ .type_ != " " ) {
218
+ rc << " -> " << overload.return_doc_ .type_ ;
219
+ }
220
+
221
+ rc << std::endl;
212
222
213
223
// Summary line, strictly speaking this shall be at the very front.
214
224
// However from a compiled Python module we need the function signature
You can’t perform that action at this time.
0 commit comments