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 {
201201 for (size_t i = 0 ; i < overload.argument_docs_ .size (); ++i) {
202202 const ArgumentDoc& argument_doc = overload.argument_docs_ [i];
203203 rc << argument_doc.name_ ;
204+ if (argument_doc.type_ != " " ) {
205+ rc << " : " << argument_doc.type_ ;
206+ }
204207 if (argument_doc.default_ != " " ) {
205- rc << " = " << argument_doc.default_ ;
208+ rc << " = " << argument_doc.default_ ;
206209 }
207210 if (i != overload.argument_docs_ .size () - 1 ) {
208211 rc << " , " ;
209212 }
210213 }
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;
212222
213223 // Summary line, strictly speaking this shall be at the very front.
214224 // However from a compiled Python module we need the function signature
You can’t perform that action at this time.
0 commit comments