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
Should be able to decorate handle() with initialize. This would allow you to do something like:
fromclickimportget_current_contextfromdjango_typerimportTyperCommand, initialize, commandclassCommand(TyperCommand):
@initialize(invoke_without_command=True)defhandle(self):
if (ctx:=get_current_context(silent=True)) andctx.invoked_subcommand:
return# if we're here a subcommand was not invokedreturn'handle'@command()defsubcommand(self):
return'subcommand'
Should be able to decorate handle() with initialize. This would allow you to do something like:
Which would allow:
And:
You currently get an exception if you try to wrap handle in initialize(), which is a borderline bug.
The text was updated successfully, but these errors were encountered: