diff --git a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/cool_module.py b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/cool_module.py index b71bcacd2ec2da4779c07a93886e07444b533e8d..7486b94f0d3286c70ac9bf04e14b1d4abd5f96b5 100644 --- a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/cool_module.py +++ b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/cool_module.py @@ -1,6 +1,33 @@ """ Cool module containing functions, classes and other useful things """ +from typing import Union +from collections import OrderedDict + def greeter(): """Prints a nice message""" print("Hello World!, test line over 80 but not 88 characters on a single line") + + +class DocumentationExample: + """Class to demonstrate docstring documentation""" + + def __init__(self): + self.attribute: str = "Hello World" + + def operate(self, data: Union[str, int]) -> int: + """Perform operation + + :py:attr:`.self.attribute` + :py:func:`~.greeter` + :py:class:`collections.OrderedDict` + + ``OrderedDict(data)`` + + :param data: The data to peform the operation on + :raises RuntimeError: Raised if not enough memory to create Dict + :return: integer value representing success or failure + """ + + test = OrderedDict() + return 0