Skip to content

Commit

Permalink
Create docstring format template with example
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Aug 10, 2020
1 parent 3b1c84c commit f82924a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docstring-format.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{! Google Docstring Template }}
{{summaryPlaceholder}}

{{extendedSummaryPlaceholder}}

Example:
[example]

{{#parametersExist}}
Args:
{{#args}}
{{var}} ({{typePlaceholder}}): {{descriptionPlaceholder}}
{{/args}}
{{#kwargs}}
{{var}} ({{typePlaceholder}}, optional): {{descriptionPlaceholder}}. Defaults to {{&default}}.
{{/kwargs}}
{{/parametersExist}}

{{#exceptionsExist}}
Raises:
{{#exceptions}}
{{type}}: {{descriptionPlaceholder}}
{{/exceptions}}
{{/exceptionsExist}}

{{#returnsExist}}
Returns:
{{#returns}}
{{typePlaceholder}}: {{descriptionPlaceholder}}
{{/returns}}
{{/returnsExist}}

{{#yieldsExist}}
Yields:
{{#yields}}
{{typePlaceholder}}: {{descriptionPlaceholder}}
{{/yields}}
{{/yieldsExist}}

0 comments on commit f82924a

Please sign in to comment.