Debian Codegraph @

docs/snippets/function_annotations_google.py

raw
1 from typing import Optional
2
3
4 def my_function(param1: int, param2: Optional[str] = None) -> str:
5 """A short description of this function.
6
7 Arguments:
8 param1: An integer?
9 param2: A string? If you have a long description,
10 you can split it on multiple lines.
11 Just remember to indent those lines consistently.
12
13 Complex markup is supported in sections items.
14
15 I'm a code block!
16 """
17 return f"{param2}{param1}"