summaryrefslogtreecommitdiff
path: root/doc/data/messages/m/missing-raises-doc/good.py
blob: c274493ea63a5aea7bcbaf3c213594251c58d279 (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