aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2021-07-23 11:19:30 +0100
committerGravatar Chris Lovering <[email protected]>2021-07-23 11:19:30 +0100
commit4b1cf360f0f7b3bcc400184a127ce74b8c98148b (patch)
tree0af7370e617da24fd480da3e279eb9d2063cf89f
parentRefer to PEP-257 as the official spec (diff)
Further describe the funciton in docstring tag
-rw-r--r--bot/resources/tags/docstring.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/resources/tags/docstring.md b/bot/resources/tags/docstring.md
index 8d6fd3615..95ad13b35 100644
--- a/bot/resources/tags/docstring.md
+++ b/bot/resources/tags/docstring.md
@@ -1,11 +1,11 @@
-A [`docstring`](https://docs.python.org/3/glossary.html#term-docstring) is a string with triple quotes that's placed at the top of files, classes and functions. A docstring should contain a clear explanation of what it's describing. You can also include descriptions of the subject's parameter(s) and its return type, as shown below:
+A [`docstring`](https://docs.python.org/3/glossary.html#term-docstring) is a string with triple quotes that's placed at the top of files, classes and functions. A docstring should contain a clear explanation of what it's describing. You can also include descriptions of the subject's parameter(s) and what it returns, as shown below:
```py
def greet(name: str, age: int) -> str:
"""
- Return a string that greets the given person, including their name and age.
+ Return a string that greets the given person, using their name and age.
- :param name: The name to greet.
- :param age: The age to display.
+ :param name: The name of the person to greet.
+ :param age: The age of the person to greet.
:return: String representation of the greeting.
"""