<commit_before># TODO: add support for perfect intervals
# TODO: allow only valid interval types (e.g., no such thing as a minor octave)
# TODO: add shorthands for tone/semitone intervals

class Interval(object):
    """Representation of an interval (i.e., gap) between notes."""

    NAMED_INTERVAL_TYPES = ('M', 'm', 'P', 'dim', 'aug')
    """Explicit interval types supported - major, minor, diminished, augmented."""

    VALID_INTERVAL_TYPES = ('dim1', 'P1', 'aug1', 'dim2', 'm2', 'aug2', 'M2', 'dim3',
    'm3', 'M3', 'aug3', 'dim4', 'P4', 'aug4', 'dim5', 'P5', 'aug5', 'dim6',
    'm6', 'M6', 'aug6', 'dim7', 'm7', 'M7', 'aug7')
    """List of valid intervals up to (but not including) a perfect octave.

    Compound intervals are formed/processed internally by adding perfect 
    octaves to these valid interval types.
    
    Inclues:

    * dim1/P1/aug1: diminished/perfect/augmented unison
    * dim2/m2/M2/aug2: diminished/minor/major/augmented second
    * dim3/m3/M3/aug3: diminished/minor/major/augmented third
    * dim4/P4/aug4: diminished/perfect/augmented fourth
    * dim5/P5/aug5: diminished/perfect/augmented fifth
    * dim6/m6/M6/aug6: diminished/minor/major/augmented sixth
    * dim7/m7/M7/aug7: diminished/minor/major/augmented seventh
    """

    def __init__(self, interval_type, size):
        """Create a new Interval.

        Args:
            interval_type : str
                The type of interval. Should be one of:attr:`~music_essentials.interval.Interval.NAMED_INTERVAL_TYPES`.
            distance : int
                The size of the interval. Should be positive.

        Returns:
            Interval
                A new interval of the given type and size.

        Raises:
            ValueError
                If an invalid interval type or size is provided.
        
        Examples:
            >>> i = Interval('M', 4)
            >>> print(i)
            M4
            >>> i = Interval('dim', 13)
            >>> print(i)
            dim13
            >>> i = Interval('i', 6)
            ValueError: Unsupported interval type specified: i
            >>> i = Interval('m', -1)
            ValueError: Expected interval distance to be positive (provided -1)
        """<commit_msg>Add extra styling to docstring.<commit_after># TODO: add support for perfect intervals
# TODO: allow only valid interval types (e.g., no such thing as a minor octave)
# TODO: add shorthands for tone/semitone intervals

class Interval(object):
    """Representation of an interval (i.e., gap) between notes."""

    NAMED_INTERVAL_TYPES = ('M', 'm', 'P', 'dim', 'aug')
    """Explicit interval types supported - major, minor, diminished, augmented."""

    VALID_INTERVAL_TYPES = ('dim1', 'P1', 'aug1', 'dim2', 'm2', 'aug2', 'M2', 'dim3',
    'm3', 'M3', 'aug3', 'dim4', 'P4', 'aug4', 'dim5', 'P5', 'aug5', 'dim6',
    'm6', 'M6', 'aug6', 'dim7', 'm7', 'M7', 'aug7')
    """List of valid intervals up to (but not including) a perfect octave.

    Compound intervals are formed/processed internally by adding perfect 
    octaves to these valid interval types.
    
    Inclues:

    * ``'dim1'``/``'P1'``/``'aug1'``: diminished/perfect/augmented unison
    * ``'dim2'``/``'m2'``/``'M2'``/``'aug2'``: diminished/minor/major/augmented second
    * ``'dim3'``/``'m3'``/``'M3'``/``'aug3'``: diminished/minor/major/augmented third
    * ``'dim4'``/``'P4'``/``'aug4'``: diminished/perfect/augmented fourth
    * ``'dim5'``/``'P5'``/``'aug5'``: diminished/perfect/augmented fifth
    * ``'dim6'``/``'m6'``/``'M6'``/``'aug6'``: diminished/minor/major/augmented sixth
    * ``'dim7'``/``'m7'``/``'M7'``/``'aug7'``: diminished/minor/major/augmented seventh
    """

    def __init__(self, interval_type, size):
        """Create a new Interval.

        Args:
            interval_type : str
                The type of interval. Should be one of:attr:`~music_essentials.interval.Interval.NAMED_INTERVAL_TYPES`.
            distance : int
                The size of the interval. Should be positive.

        Returns:
            Interval
                A new interval of the given type and size.

        Raises:
            ValueError
                If an invalid interval type or size is provided.
        
        Examples:
            >>> i = Interval('M', 4)
            >>> print(i)
            M4
            >>> i = Interval('dim', 13)
            >>> print(i)
            dim13
            >>> i = Interval('i', 6)
            ValueError: Unsupported interval type specified: i
            >>> i = Interval('m', -1)
            ValueError: Expected interval distance to be positive (provided -1)
        """
{'fraction_non_alphanumeric': 0.15376344086021507, 'fraction_numerical': 0.025376344086021504, 'mean_word_length': 2.4451851851851854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '333263', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1459, 'n_words': 420}