view CodeAnalysis/FunctionDocumentation.mustache @ 225:68890fd54e5d OrthancPython-4.3

hot backport of Docker-based build scripts for Debian 12 (bookworm)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 31 Aug 2024 10:17:22 +0200
parents d7acfccc0d0b
children
line wrap: on
line source

{{#args}}{{#callable_protocol_return}}
class {{callable_type}}(typing.Protocol):
    def __call__(self{{#callable_protocol_args}}, {{callable_protocol_args}}{{/callable_protocol_args}}) -> {{callable_protocol_return}}:
        ...
{{/callable_protocol_return}}{{/args}}
{{#documentation.short_description}}
# {{documentation.short_description}}
{{/documentation.short_description}}
def {{short_name}}({{#self}}self{{#documentation.has_args}}, {{/documentation.has_args}}{{/self}}{{documentation.args_declaration}}) -> {{documentation.return_type}}:
    """
{{#documentation.description}}
    {{text}}
{{/documentation.description}}
{{#documentation.has_args}}

    Args:
      {{#documentation.args}}
      {{name}} ({{type}}): {{text}}
      {{/documentation.args}}
{{/documentation.has_args}}
{{#documentation.has_return}}

    Returns:
      {{documentation.return_type}}: {{documentation.return_text}}
{{/documentation.has_return}}
    """
    ...