Debian Codegraph @

docs/snippets/function_annotations_rst.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 Complex markup is supported in the main description section.
8
9 I'm a code block!
10
11 :param param1: An integer?
12 :param param2: A string? If you have a long description,
13 you can split it on multiple lines.
14 """
15 return f"{param2}{param1}"