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
Hi @anirban1c thank you for the suggestion. The Azure CLI was originally written using just such decorators, but we fould it didn't scale well and maintenance was extremely tedious. At least in Azure CLI, many commands had the common arguments with the common metadata, which mean I needed a dozen lines of extra decorator code per command, and if I wanted to update the help text for all the commands, I had to update it in multiple places.
That is the basis for the argument registries in Knack, which follow the DRY principle and avoid all the decorator boilerplate.
something like
@command
@argument('--id', type=int, help='My name', desc='ID of some kind')
@argument('--name', type=str, help='My name', desc='is my name')
createRecord(id, name):
`...
The text was updated successfully, but these errors were encountered: