https://github.com/mannasoumya/py-docstring-generator
Auto Generate Python Docstrings
https://github.com/mannasoumya/py-docstring-generator
docs-generator docstring docstring-generator docstrings documentation python python3
Last synced: 9 months ago
JSON representation
Auto Generate Python Docstrings
- Host: GitHub
- URL: https://github.com/mannasoumya/py-docstring-generator
- Owner: mannasoumya
- License: mit
- Created: 2022-08-23T15:51:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T09:49:53.000Z (about 3 years ago)
- Last Synced: 2025-01-23T01:13:43.146Z (11 months ago)
- Topics: docs-generator, docstring, docstring-generator, docstrings, documentation, python, python3
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto Generate Python Docstrings
## Quick Start
```console
$ python3 docstring_generator_auto.py test.py
Function `hello1`
Params ['a:str', 'b:list', 'c']
Do you want to write docstring for `hello1` ? (y/n) y
Enter function summary: This is first hello
Are you sure? (y/n) y
a : str
Enter parameter summary: first param
Are you sure? (y/n) y
b : list
Enter parameter summary: second param
Are you sure? (y/n) y
c :
Enter parameter summary: third param
Are you sure? (y/n) y
No explicit return type found for function `hello1`
Enter return summary: Returns None
Are you sure? (y/n) y
Function `hello2`
Params ['a:tuple']
Do you want to write docstring for `hello2` ? (y/n) y
Enter function summary: This is second hello
Are you sure? (y/n) y
a : tuple
Enter parameter summary: tuple param
Are you sure? (y/n) y
No explicit return type found for function `hello2`
Enter return summary: Returns None
Are you sure? (y/n) y
Function `hello3` has no parameters
Do you want to write docstring for `hello3` ? (y/n) y
Enter function summary: This is third hello
Are you sure? (y/n) y
Return type of function `hello3` is `str`
Enter return summary: Returns hello3
Are you sure? (y/n) y
New file with docstings saved at : `test_docstrings.py`
```
#### When all docstrings are added, skip all functions
```console
$ python3 docstring_generator_auto.py test.py
Function `hello1`
Params ['a:str', 'b:list', 'c']
Do you want to write docstring for `hello1` ? (y/n) n
Function `hello2`
Params ['a:tuple']
Do you want to write docstring for `hello2` ? (y/n) n
Function `hello3` has no parameters
Do you want to write docstring for `hello3` ? (y/n) n
No docstrings to save... Exiting
```
**New file with docstring is generated at **