Mercurial > hg > orthanc-python
comparison CodeAnalysis/PythonDocumentation.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 | ddf3e987827f |
children | 20b004998fc2 |
comparison
equal
deleted
inserted
replaced
180:ddf3e987827f | 181:faaa3fec799a |
---|---|
35 {{/values}} | 35 {{/values}} |
36 {{/enumerations}} | 36 {{/enumerations}} |
37 | 37 |
38 | 38 |
39 {{#global_functions}} | 39 {{#global_functions}} |
40 | 40 {{> function_documentation}} |
41 {{#documentation.short_description}} | |
42 # {{documentation.short_description}} | |
43 {{/documentation.short_description}} | |
44 def {{short_name}}({{documentation.args_declaration}}) -> {{documentation.return_type}}: | |
45 """ | |
46 {{#documentation.description}} | |
47 {{text}} | |
48 {{/documentation.description}} | |
49 {{#documentation.has_args}} | |
50 | |
51 Args: | |
52 {{#documentation.args}} | |
53 {{name}} ({{type}}): {{text}} | |
54 {{/documentation.args}} | |
55 {{/documentation.has_args}} | |
56 {{#documentation.has_return}} | |
57 | |
58 Returns: | |
59 {{documentation.return_type}}: {{documentation.return_text}} | |
60 {{/documentation.has_return}} | |
61 """ | |
62 ... | |
63 {{/global_functions}} | 41 {{/global_functions}} |
64 | 42 |
65 | 43 |
66 {{#classes}} | 44 {{#classes}} |
67 class {{short_name}}: | 45 class {{short_name}}: |
68 ... | 46 ... |
69 | 47 |
70 {{#methods}} | 48 {{#methods}} |
71 {{#documentation.short_description}} | 49 {{> function_documentation}} |
72 # {{documentation.short_description}} | |
73 {{/documentation.short_description}} | |
74 def {{short_name}}(self{{#documentation.has_args}}, {{/documentation.has_args}}{{documentation.args_declaration}}) -> {{documentation.return_type}}: | |
75 """ | |
76 {{#documentation.description}} | |
77 {{text}} | |
78 {{/documentation.description}} | |
79 {{#documentation.has_args}} | |
80 | |
81 Args: | |
82 {{#documentation.args}} | |
83 {{name}} ({{type}}): {{text}} | |
84 {{/documentation.args}} | |
85 {{/documentation.has_args}} | |
86 {{#documentation.has_return}} | |
87 | |
88 Returns: | |
89 {{documentation.return_type}}: {{documentation.return_text}} | |
90 {{/documentation.has_return}} | |
91 """ | |
92 ... | |
93 | |
94 {{/methods}} | 50 {{/methods}} |
95 {{/classes}} | 51 {{/classes}} |