diff options
| author | 2021-07-23 11:02:57 +0100 | |
|---|---|---|
| committer | 2021-07-23 11:10:16 +0100 | |
| commit | 1dec12a1b024283cc3464f0f81bb78375280e82c (patch) | |
| tree | 44e07f8d32edf00148bb24f21b28e1f1de610692 | |
| parent | Fix grammar issues in docstring tag (diff) | |
Move type docs to type hints
| -rw-r--r-- | bot/resources/tags/docstring.md | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/resources/tags/docstring.md b/bot/resources/tags/docstring.md index 2918281c3..7144d3702 100644 --- a/bot/resources/tags/docstring.md +++ b/bot/resources/tags/docstring.md @@ -1,13 +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: ```py -def greet(name, age) -> str: +def greet(name: str, age: int) -> str: """ Return a string that greets the given person, including their name and age. :param name: The name to greet. - :type name: str :param age: The age to display. - :type age: int :return: String representation of the greeting. """ |