Did I find the right examples for you? yes no

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/a/r/argh-0.24.1/argh/decorators.py   argh(Download)
"""
from argh.assembling import _fix_compat_issue29
from argh.constants import (ATTR_ALIASES, ATTR_ARGS, ATTR_NAME,
                            ATTR_WRAPPED_EXCEPTIONS,
                            ATTR_WRAPPED_EXCEPTIONS_PROCESSOR,
    def wrapper(func):
        declared_args = getattr(func, ATTR_ARGS, [])
        # The innermost decorator is called first but appears last in the code.
        # We need to preserve the expected order of positional arguments, so
        # the outermost decorator inserts its value before the innermost's:
        declared_args.insert(0, dict(option_strings=args, **kwargs))
        setattr(func, ATTR_ARGS, declared_args)

src/a/r/argh-HEAD/argh/decorators.py   argh(Download)
"""
from argh.assembling import _fix_compat_issue29
from argh.constants import (ATTR_ALIASES, ATTR_ARGS, ATTR_NAME,
                            ATTR_WRAPPED_EXCEPTIONS,
                            ATTR_WRAPPED_EXCEPTIONS_PROCESSOR,
    def wrapper(func):
        declared_args = getattr(func, ATTR_ARGS, [])
        # The innermost decorator is called first but appears last in the code.
        # We need to preserve the expected order of positional arguments, so
        # the outermost decorator inserts its value before the innermost's:
        declared_args.insert(0, dict(option_strings=args, **kwargs))
        setattr(func, ATTR_ARGS, declared_args)

src/a/r/argh-0.24.1/argh/assembling.py   argh(Download)
from argh.completion import COMPLETION_ENABLED
from argh.compat import OrderedDict
from argh.constants import (ATTR_ALIASES, ATTR_ARGS, ATTR_NAME,
                            ATTR_INFER_ARGS_FROM_SIGNATURE,
                            ATTR_EXPECTS_NAMESPACE_OBJECT,
    spec = get_arg_spec(function)
 
    declared_args = getattr(function, ATTR_ARGS, [])
    inferred_args = list(_get_args_from_signature(function))
 

src/a/r/argh-HEAD/argh/assembling.py   argh(Download)
from argh.completion import COMPLETION_ENABLED
from argh.compat import OrderedDict
from argh.constants import (ATTR_ALIASES, ATTR_ARGS, ATTR_NAME,
                            ATTR_INFER_ARGS_FROM_SIGNATURE,
                            ATTR_EXPECTS_NAMESPACE_OBJECT,
    spec = get_arg_spec(function)
 
    declared_args = getattr(function, ATTR_ARGS, [])
    inferred_args = list(_get_args_from_signature(function))
 

src/a/r/argh-HEAD/test/test_decorators.py   argh(Download)
        pass
 
    attrs = getattr(func, argh.constants.ATTR_ARGS)
    assert attrs == [
        dict(option_strings=('foo',), help='help', nargs='+'),

src/a/r/argh-HEAD/test/test_assembling.py   argh(Download)
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, (
        dict(option_strings=('foo',), nargs='+', choices=[1,2], help='me'),
        dict(option_strings=('-b', '--bar',), default=False),
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, [
        dict(option_strings=('x','--y'))
    ])
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, [
        dict(option_strings=('foo',), completer='STUB')
    ])
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, [
        dict(option_strings=('foo',), completer='STUB')
    ])

src/a/r/argh-0.24.1/test/test_decorators.py   argh(Download)
        pass
 
    attrs = getattr(func, argh.constants.ATTR_ARGS)
    assert attrs == [
        dict(option_strings=('foo',), help='help', nargs='+'),

src/a/r/argh-0.24.1/test/test_assembling.py   argh(Download)
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, (
        dict(option_strings=('foo',), nargs='+', choices=[1,2], help='me'),
        dict(option_strings=('-b', '--bar',), default=False),
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, [
        dict(option_strings=('x','--y'))
    ])
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, [
        dict(option_strings=('foo',), completer='STUB')
    ])
        pass
 
    setattr(func, argh.constants.ATTR_ARGS, [
        dict(option_strings=('foo',), completer='STUB')
    ])