templates-project_setup/python/template-module.py

54 lines
1.1 KiB
Python

"""
TODO This is just an example of a module docstring. Explain what this module
does at this place.
Author: Name <email@example.com>
Copyright: (c) Company Name/ Author, YEAR
Copyright: Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
Copyright: Licensed under the GNU GPLv3 License http://www.gnu.org/licenses/gpl-3.0.txt
"""
import logging
LOGGER = logging.getLogger(__name__)
class MyClass:
"""
Put a short explanation of this class here.
Attributes:
public_param: Some publicly accessible parameter
"""
_private_param: str
public_param: int
def __init__(self, param1):
"""
The constructor for MyClass.
Parameters:
param1: Description of param1
"""
_private_param = param1
def my_function(param1: int) -> int:
"""
Summary line.
Extended description of function.
Parameters:
param1: Description of param1
Returns:
Description of return value
"""
return param1 * 5
if __name__ == "__main__":
LOGGER.error("do not run this on it's own")