screenshare/venv/lib/python3.12/site-packages/entrypoint2/examples/add.py
2024-11-29 18:15:30 +00:00

26 lines
447 B
Python

import logging
from entrypoint2 import entrypoint
__version__ = "3.2"
@entrypoint
def add(one: int, two=4, three=False):
"""This function adds two numbers.
:param one: first number to add
:param two: second number to add
:param three: print hello if True
:rtype: int
"""
# 'one' and 'two' are converted to int
s = one + two
logging.debug(s)
print(s)
if three:
print("hello")
return s