| #set( $nl = " |
| " ) |
| #set( $fn = $funcInfo.functionName) |
| #set( $fnl = $fn.replaceAll("[.]", "_").toLowerCase()) |
| {.starlark-object} |
| #[[##]]# $fn |
| |
| #set( $hasParams = false) |
| {.starlark-signature} |
| ${funcInfo.functionName}(## Comment to consume newline |
| #foreach ($param in $funcInfo.getParameterList()) |
| #if($param.name != "self") |
| #set( $hasParams = true) |
| [${param.name}](#${fnl}_${param.name})## Comment to consume newline |
| #if(!$param.getDefaultValue().isEmpty()) |
| =$param.getDefaultValue()#end#if($foreach.hasNext), |
| #end |
| #end |
| #end |
| ) |
| |
| ${funcInfo.docString} |
| |
| #if ($hasParams) |
| {#${fnl}_parameters} |
| **PARAMETERS** [¶](#${fnl}_parameters){.headerlink} |
| |
| #foreach ($param in $funcInfo.getParameterList()) |
| #if($param.name != "self") |
| #set($link = $fnl + "_" + $param.name) |
| #if($foreach.first) |
| {.params-box} |
| #end |
| ## The .span wrapper is necessary so the trailing colon doesn't wrap |
| :[${param.name}[¶](#$link){.headerlink}]{.span}: |
| {#$link} |
| #if(!$param.getDefaultValue().isEmpty()) (_default `${param.getDefaultValue()}`_) #end |
| #if(!$param.docString.isEmpty()) |
| $param.docString.replaceAll("$nl", "$nl ") |
| #else |
| _undocumented_ |
| #end |
| #end |
| #end |
| #end |
| #if (!$funcInfo.getReturn().docString.isEmpty()) |
| |
| {#${fnl}_returns} |
| RETURNS [¶](#${fnl}_returns){.headerlink} |
| : ${funcInfo.getReturn().docString.replaceAll("$nl", "$nl ")} |
| #end |
| #if (!$funcInfo.getDeprecated().docString.isEmpty()) |
| |
| **DEPRECATED** |
| |
| ${funcInfo.getDeprecated().docString} |
| #end |