Skip to content

Commit d5bed91

Browse files
committed
fixup! feat: add docstring prompt
1 parent 893f0cf commit d5bed91

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/git_draft/prompt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ class TemplatedPrompt:
1616

1717
@classmethod
1818
def parse(cls, name: str, *args: str) -> Self:
19-
"""Parse arguments into a TemplatedPrompt.
19+
"""Parse arguments into a TemplatedPrompt
2020
2121
Args:
2222
name: The name of the template.
23-
*args: Additional arguments for context, expected in 'key=value' format.
23+
*args: Additional arguments for context, expected in 'key=value'
24+
format.
2425
"""
2526
return cls(name, dict(e.split("=", 1) for e in args))
2627

src/git_draft/prompts/add-docstrings.jinja

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ examples:
1616

1717
```python
1818
def write_file(path: Path, contents: str) -> None:
19-
"""Update a file's contents
19+
"""Updates a file's contents
2020

2121
Args:
2222
path: Path to the file to update.
@@ -30,4 +30,8 @@ class Renderer:
3030
...
3131
```
3232

33+
Additionally, the first paragraph of each docstring should fit in a single line
34+
and not include a period at the end. It should be a brief summary of the
35+
symbol's functionality.
36+
3337
{% include "includes/file-list.jinja" %}

0 commit comments

Comments
 (0)