Skip to content

Modules

foo(bar)

Summary line.

Extended description of function.

Parameters:

Name Type Description Default
bar str

Description of input argument.

required

Returns:

Type Description
str

Description of return value

Source code in src/ml_vision_lab/foo.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
def foo(bar: str) -> str:
    """Summary line.

    Extended description of function.

    Args:
        bar: Description of input argument.

    Returns:
        Description of return value
    """

    return bar

my_add(a, b, absolute=False)

Add two integers together.

A simple function to test the structure of the overall project

Parameters:

Name Type Description Default
a int

int the first integer.

required
b int

int the second integer.

required
absolute bool

bool if the absolute value should be returned

False

Returns:

Type Description
int

Returns the sum of the two integers.

int

If absolute = True then return the aboslute value of the sum.

Source code in src/ml_vision_lab/foo.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def my_add(a: int, b: int, absolute: bool = False) -> int:
    """Add two integers together.

    A simple function to test the structure of the overall project

    Args:
        a:int  the first integer.
        b:int  the second integer.
        absolute: bool if the absolute value should be returned

    Returns:
        Returns the sum of the two integers.
        If absolute = True then return the aboslute value of the sum.
    """
    result = a + b
    if absolute:
        result = abs(result)
    return result