Update write_docstring.py to make the template of the prompt more clear

This commit is contained in:
shenchucheng 2023-08-07 10:16:00 +08:00 committed by GitHub
parent cfb26155c6
commit 50cdba3052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,9 @@ class ExampleError(Exception):
```
### Output Example
```python{example}```
```python
{example}
```
'''
# https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
@ -120,9 +122,9 @@ class ExampleError(Exception):
'''
_python_docstring_style = {
"google": PYTHON_DOCSTRING_EXAMPLE_GOOGLE,
"numpy": PYTHON_DOCSTRING_EXAMPLE_NUMPY,
"sphinx": PYTHON_DOCSTRING_EXAMPLE_SPHINX,
"google": PYTHON_DOCSTRING_EXAMPLE_GOOGLE.strip(),
"numpy": PYTHON_DOCSTRING_EXAMPLE_NUMPY.strip(),
"sphinx": PYTHON_DOCSTRING_EXAMPLE_SPHINX.strip(),
}