summaryrefslogtreecommitdiff
path: root/doc/data/messages/m/missing-raises-doc/good.py
blob: 6ca44d0fdbf9bf3dfc9b216bea39831d7c6ffdf1 (plain)
1
2
3
4
5
6
7
8
9
def integer_sum(a: int, b: int):
    """Returns sum of two integers
    :param a: first integer
    :param b: second integer
    :raises ValueError: One of the parameters is not an integer.
    """
    if not (isinstance(a, int) and isinstance(b, int)):
        raise ValueError("Function supports only integer parameters.")
    return a + b