# Path: librosa/_cache.py
# def _decorator_apply(dec, func):
#     def __init__(self, *args, **kwargs):
#     def __call__(self, level):
#         def wrapper(function):
#     def clear(self, *args, **kwargs):
#     def eval(self, *args, **kwargs):
#     def format(self, *args, **kwargs):
#     def reduce_size(self, *args, **kwargs):
#     def warn(self, *args, **kwargs):
# class CacheManager(object):
# 
# Path: librosa/util/exceptions.py
# class ParameterError(LibrosaError):
#     """Exception class for mal-formed inputs"""
# 
#     pass
# 
# Path: librosa/util/decorators.py
# def deprecate_positional_args(func=None, *, version="0.10"):
#     """Decorator for methods that issues warnings for positional arguments.
#     Using the keyword-only argument syntax in pep 3102, arguments after the
#     * will issue a warning when passed as a positional argument.
#     Parameters
#     ----------
#     func : callable, default=None
#         Function to check arguments on.
#     version : callable, default="0.10"
#         The version when positional arguments will result in error.
#     """
# 
#     def _inner_deprecate_positional_args(f):
#         sig = signature(f)
#         kwonly_args = []
#         all_args = []
# 
#         for name, param in sig.parameters.items():
#             if param.kind == Parameter.POSITIONAL_OR_KEYWORD:
#                 all_args.append(name)
#             elif param.kind == Parameter.KEYWORD_ONLY:
#                 kwonly_args.append(name)
# 
#         @wraps(f)
#         def inner_f(*args, **kwargs):
#             extra_args = len(args) - len(all_args)
#             if extra_args <= 0:
#                 return f(*args, **kwargs)
# 
#             # extra_args > 0
#             args_msg = [
#                 "{}={}".format(name, arg)
#                 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
#             ]
#             args_msg = ", ".join(args_msg)
#             warnings.warn(
#                 f"Pass {args_msg} as keyword args. From version "
#                 f"{version} passing these as positional arguments "
#                 "will result in an error",
#                 FutureWarning,
#                 stacklevel=2,
#             )
#             kwargs.update(zip(sig.parameters, args))
#             return f(**kwargs)
# 
#         return inner_f
# 
#     if func is not None:
#         return _inner_deprecate_positional_args(func)
# 
#     return _inner_deprecate_positional_args


import re
import numpy as np
from .._cache import cache
from ..util.exceptions import ParameterError
from ..util.decorators import deprecate_positional_args
        for each of the seven scale degrees in the given key, starting
        from the tonic.

    See Also
    --------
    key_to_notes

    Examples
    --------
    >>> librosa.key_to_degrees('C:maj')
    array([ 0,  2,  4,  5,  7,  9, 11])

    >>> librosa.key_to_degrees('C#:maj')
    array([ 1,  3,  5,  6,  8, 10,  0])

    >>> librosa.key_to_degrees('A:min')
    array([ 9, 11,  0,  2,  4,  5,  7])

    """
    notes = dict(
        maj=np.array([0, 2, 4, 5, 7, 9, 11]), min=np.array([0, 2, 3, 5, 7, 8, 10])
    )

    match = re.match(
        r"^(?P<tonic>[A-Ga-g])"
        r"(?P<accidental>[#♯b!♭]?)"
        r":(?P<scale>(maj|min)(or)?)$",
        key,
    )
    if not match:

# Path: librosa/_cache.py
# def _decorator_apply(dec, func):
#     def __init__(self, *args, **kwargs):
#     def __call__(self, level):
#         def wrapper(function):
#     def clear(self, *args, **kwargs):
#     def eval(self, *args, **kwargs):
#     def format(self, *args, **kwargs):
#     def reduce_size(self, *args, **kwargs):
#     def warn(self, *args, **kwargs):
# class CacheManager(object):
# 
# Path: librosa/util/exceptions.py
# class ParameterError(LibrosaError):
#     """Exception class for mal-formed inputs"""
# 
#     pass
# 
# Path: librosa/util/decorators.py
# def deprecate_positional_args(func=None, *, version="0.10"):
#     """Decorator for methods that issues warnings for positional arguments.
#     Using the keyword-only argument syntax in pep 3102, arguments after the
#     * will issue a warning when passed as a positional argument.
#     Parameters
#     ----------
#     func : callable, default=None
#         Function to check arguments on.
#     version : callable, default="0.10"
#         The version when positional arguments will result in error.
#     """
# 
#     def _inner_deprecate_positional_args(f):
#         sig = signature(f)
#         kwonly_args = []
#         all_args = []
# 
#         for name, param in sig.parameters.items():
#             if param.kind == Parameter.POSITIONAL_OR_KEYWORD:
#                 all_args.append(name)
#             elif param.kind == Parameter.KEYWORD_ONLY:
#                 kwonly_args.append(name)
# 
#         @wraps(f)
#         def inner_f(*args, **kwargs):
#             extra_args = len(args) - len(all_args)
#             if extra_args <= 0:
#                 return f(*args, **kwargs)
# 
#             # extra_args > 0
#             args_msg = [
#                 "{}={}".format(name, arg)
#                 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
#             ]
#             args_msg = ", ".join(args_msg)
#             warnings.warn(
#                 f"Pass {args_msg} as keyword args. From version "
#                 f"{version} passing these as positional arguments "
#                 "will result in an error",
#                 FutureWarning,
#                 stacklevel=2,
#             )
#             kwargs.update(zip(sig.parameters, args))
#             return f(**kwargs)
# 
#         return inner_f
# 
#     if func is not None:
#         return _inner_deprecate_positional_args(func)
# 
#     return _inner_deprecate_positional_args


# Path: librosa/core/notation.py
import re
import numpy as np
from .._cache import cache
from ..util.exceptions import ParameterError
from ..util.decorators import deprecate_positional_args

        for each of the seven scale degrees in the given key, starting
        from the tonic.

    See Also
    --------
    key_to_notes

    Examples
    --------
    >>> librosa.key_to_degrees('C:maj')
    array([ 0,  2,  4,  5,  7,  9, 11])

    >>> librosa.key_to_degrees('C#:maj')
    array([ 1,  3,  5,  6,  8, 10,  0])

    >>> librosa.key_to_degrees('A:min')
    array([ 9, 11,  0,  2,  4,  5,  7])

    """
    notes = dict(
        maj=np.array([0, 2, 4, 5, 7, 9, 11]), min=np.array([0, 2, 3, 5, 7, 8, 10])
    )

    match = re.match(
        r"^(?P<tonic>[A-Ga-g])"
        r"(?P<accidental>[#♯b!♭]?)"
        r":(?P<scale>(maj|min)(or)?)$",
        key,
    )
    if not match:

        raise ParameterError("Improper key format: {:s}".format(key))