from typing import Callable
from typing import List
from typing import Tuple
from typing import Type
import inspect


def parameters(method: Callable) -> List[Tuple[str, Type]]:
    """
    Inspect the desired method extracting a list of parameters needed
    to execute it.

    Parameters:
        method: The type.Callable that will be inspected

    Returns:
        A list of Tuples with the parameter name and its annotation
    """
    output: List[Tuple[str, Type]] = list()
    if callable(method):
        spec: inspect.FullArgSpec = inspect.getfullargspec(method)

        if spec.args:
            for index in range(0, len(spec.args)):
                arg: str = spec.args[index]
                if arg == 'self' or arg == 'cls':
                    continue

                output.append((arg, spec.annotations[arg]))

    return output