You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importarghimportfunctoolsdefdecorated(f):
@functools.wraps(f)defwrapped(*args, **kwargs):
print("Wrapping function call")
returnf(*args, **kwargs)
returnwrappeddeftest1(a, b=1):
print("Hello World!", a, b)
@decorateddeftest2(a, b=1):
print("Hello World!", a, b)
@argh.named("test4")@decorated@decorateddeftest3(a, b=1):
print("Hello World!", a, b)
parser=argh.ArghParser()
parser.add_commands([test1, test3])
parser.add_commands([test2], namespace='a')
argh.dispatch(parser)
Running --help on test4 or a test2 end up picking up the unwrapped variant, specifically they display optional positional arguments and no -b.
Running --help on
test4
ora test2
end up picking up the unwrapped variant, specifically they display optional positional arguments and no -b.I guess this needs a similar solution to #111?
The text was updated successfully, but these errors were encountered: