Last active
September 8, 2022 05:29
-
-
Save MaddyGuthridge/9d3a071f452b382c6777146634178a8e to your computer and use it in GitHub Desktop.
A docstring template based on Google's template, modified to read better with Markdown formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{! Google Docstring Template }} | |
{{! Modified to be markdown-friendly}} | |
{{! Originally sourced from: https://github.com/NilsJPWerner/autoDocstring/blob/master/src/docstring/templates/google.mustache}} | |
{{summaryPlaceholder}} | |
{{extendedSummaryPlaceholder}} | |
{{#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}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment