
def is_siret(siret):
    # A valid SIRET is composed by 14 digits
    try:
        int(siret)
    except ValueError:
        return False

    return len(siret) == 14


def is_siret(siret):
    # A valid SIRET is composed by 14 digits
    return len(siret) == 14 and siret.isdigit()

Use isdigit() instead of int()
Use isdigit() instead of int()
