Example #1
0
 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)
     _fix_compat_issue29(func)
     return func
Example #2
0
 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)
     _fix_compat_issue29(func)
     return func
Example #3
0
 def wrapper(func):
     setattr(func, ATTR_NAME, new_name)
     _fix_compat_issue29(func)
     return func
Example #4
0
 def wrapper(func):
     setattr(func, ATTR_NAME, new_name)
     _fix_compat_issue29(func)
     return func