File: function_annotations_rst.py

package info (click to toggle)
mkdocstrings-python-legacy 0.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 536 kB
  • sloc: python: 907; makefile: 29; sh: 17; javascript: 13
file content (15 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import Optional


def my_function(param1: int, param2: Optional[str] = None) -> str:
    """A short description of this function.

    Complex markup is supported in the main description section.

        I'm a code block!

    :param param1: An integer?
    :param param2: A string? If you have a long description,
        you can split it on multiple lines.
    """
    return f"{param2}{param1}"