File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
mkdocstrings/handlers/crystal Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ def is_abstract(self) -> bool:
346346 return bool (self .data .get ("abstract" ))
347347
348348 @cached_property
349- def args_string (self ) -> crystal_html . TextWithLinks :
349+ def args_string (self ) -> str :
350350 """[A rich string][mkdocstrings.handlers.crystal.crystal_html.TextWithLinks] with the method's parameters.
351351
352352 e.g. `(foo : Bar) : Baz`
@@ -355,7 +355,11 @@ def args_string(self) -> crystal_html.TextWithLinks:
355355 try :
356356 html = self .data ["args_html" ]
357357 except KeyError :
358- html = self .data .get ("args_string" , "" )
358+ html = self .data .get ("args_string" )
359+ if html is None :
360+ # https://github.com/crystal-lang/crystal/issues/12043
361+ ret = self .data ["def" ].get ("return_type" , "" )
362+ return ret and " : " + ret
359363 return crystal_html .parse_crystal_html (html )
360364
361365 @cached_property
You can’t perform that action at this time.
0 commit comments