def hamming_distance(seq_1: str, seq_2: str, ignore_case: bool=False) ->int:
    """Calculate the Hamming distance between two sequences.

    Args:
        seq_1: first sequence to compare
        seq_2: second sequence to compare
        ignore_case: ignore case when comparing sequences (default: False)

    Returns:
        distance: Hamming distance
    """
    if len(seq_1) != len(seq_2):
        raise ValueError(
            'Cannot calculate Hamming distance of sequences with different lengths.'
            )
    if ignore_case:
        seq_1 = seq_1.casefold()
        seq_2 = seq_2.casefold()
    distance = sum([(1) for i in range(len(seq_1)) if seq_1[i] != seq_2[i] and
        seq_1[i] != '-' and seq_2[i] != '-'])
    return distance
