Skip to content

Commit 530155c

Browse files
authored
fix: 🩹 Update docstring template (#175)
## Description I noticed that the template doesn't follow the examples in the style guide, e.g. under the [Functions and Methods](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods) section. So I: - moved the Raises section below Returns - added `.` after placeholders ## Reviewer Focus <!-- Please delete as appropriate: --> This PR needs a quick review.
2 parents bffc160 + 24068f6 commit 530155c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.vscode/google-notypes.mustache

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
{{! Copied from https://github.com/NilsJPWerner/autoDocstring/blob/master/src/docstring/templates/google-notypes.mustache }}
1+
{{! Copied from https://github.com/NilsJPWerner/autoDocstring/blob/master/src/docstring/templates/google-notypes.mustache with some edits }}
22
{{! Google Docstring Template without Types for Args, Returns or Yields }}
3-
{{summaryPlaceholder}}
3+
{{summaryPlaceholder}}.
44

55
{{extendedSummaryPlaceholder}}
66
{{#parametersExist}}
77

88
Args:
99
{{#args}}
10-
{{var}}: {{descriptionPlaceholder}}
10+
{{var}}: {{descriptionPlaceholder}}.
1111
{{/args}}
1212
{{#kwargs}}
1313
{{var}}: {{descriptionPlaceholder}}. Defaults to {{&default}}.
1414
{{/kwargs}}
1515
{{/parametersExist}}
16-
{{#exceptionsExist}}
17-
18-
Raises:
19-
{{#exceptions}}
20-
{{type}}: {{descriptionPlaceholder}}
21-
{{/exceptions}}
22-
{{/exceptionsExist}}
2316
{{#returnsExist}}
2417

2518
Returns:
2619
{{#returns}}
27-
{{descriptionPlaceholder}}
20+
{{descriptionPlaceholder}}.
2821
{{/returns}}
2922
{{/returnsExist}}
23+
{{#exceptionsExist}}
24+
25+
Raises:
26+
{{#exceptions}}
27+
{{type}}: {{descriptionPlaceholder}}.
28+
{{/exceptions}}
29+
{{/exceptionsExist}}
3030
{{#yieldsExist}}
3131

3232
Yields:
3333
{{#yields}}
34-
{{descriptionPlaceholder}}
34+
{{descriptionPlaceholder}}.
3535
{{/yields}}
36-
{{/yieldsExist}}
36+
{{/yieldsExist}}

0 commit comments

Comments
 (0)