Did I find the right examples for you? yes no

All Samples(12)  |  Call(8)  |  Derive(0)  |  Import(4)
Returns argument specification for given function.  Omits special
arguments of instance methods (`self`) and static methods (usually `cls`
or something like this).

        def get_arg_spec(function):
    """Returns argument specification for given function.  Omits special
    arguments of instance methods (`self`) and static methods (usually `cls`
    or something like this).
    """
    spec = compat.getargspec(function)
    if inspect.ismethod(function):
        spec = spec._replace(args=spec.args[1:])
    return spec
        


src/a/r/argh-0.24.1/argh/assembling.py   argh(Download)
                            ATTR_EXPECTS_NAMESPACE_OBJECT,
                            PARSER_FORMATTER)
from argh.utils import get_subparsers, get_arg_spec
from argh.exceptions import AssemblingError
 
def _get_args_from_signature(function):
    if getattr(function, ATTR_EXPECTS_NAMESPACE_OBJECT, False):
        return
 
    spec = get_arg_spec(function)
    # only argument named "args".  If so, we simply wrap this function in
    # @expects_obj and issue a warning.
    spec = get_arg_spec(function)
 
    if spec.args in [['arg'], ['args'], ['self', 'arg'], ['self', 'args']]:
    function = _fix_compat_issue29(function)
 
    spec = get_arg_spec(function)
 
    declared_args = getattr(function, ATTR_ARGS, [])

src/a/r/argh-HEAD/argh/assembling.py   argh(Download)
                            ATTR_EXPECTS_NAMESPACE_OBJECT,
                            PARSER_FORMATTER)
from argh.utils import get_subparsers, get_arg_spec
from argh.exceptions import AssemblingError
 
def _get_args_from_signature(function):
    if getattr(function, ATTR_EXPECTS_NAMESPACE_OBJECT, False):
        return
 
    spec = get_arg_spec(function)
    # only argument named "args".  If so, we simply wrap this function in
    # @expects_obj and issue a warning.
    spec = get_arg_spec(function)
 
    if spec.args in [['arg'], ['args'], ['self', 'arg'], ['self', 'args']]:
    function = _fix_compat_issue29(function)
 
    spec = get_arg_spec(function)
 
    declared_args = getattr(function, ATTR_ARGS, [])

src/a/r/argh-0.24.1/argh/dispatching.py   argh(Download)
from argh.assembling import add_commands, set_default_command
from argh.exceptions import CommandError
from argh.utils import get_arg_spec
 
 
            # actual function will pass
 
            spec = get_arg_spec(args.function)
 
            positional = [all_input[k] for k in spec.args]

src/a/r/argh-HEAD/argh/dispatching.py   argh(Download)
from argh.assembling import add_commands, set_default_command
from argh.exceptions import CommandError
from argh.utils import get_arg_spec
 
 
            # actual function will pass
 
            spec = get_arg_spec(args.function)
 
            positional = [all_input[k] for k in spec.args]