diff CodeAnalysis/FunctionDocumentation.mustache @ 181:faaa3fec799a java-code-model

refactoring using FunctionDocumentation.mustache
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 13:26:33 +0200
parents
children 7e8085f80df5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CodeAnalysis/FunctionDocumentation.mustache	Tue Jul 02 13:26:33 2024 +0200
@@ -0,0 +1,22 @@
+{{#documentation.short_description}}
+# {{documentation.short_description}}
+{{/documentation.short_description}}
+def {{short_name}}({{#is_method}}self{{#documentation.has_args}}, {{/documentation.has_args}}{{/is_method}}{{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}}
+    """
+    ...