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
{{ message }}
Repository navigation
Letting Group(commands=) take a list of Commands #1339
I'm not sure adding this to the group init is worth it. The API for group clearly asks for a dictionary of commands. I think making group accept a list or sequence complicates the API, and doesn't provide value outside of the slightly smaller user code.
Happy to review a PR on it though, if you think it does provide value to Click as a whole.
I realize this adds a little bit of complexity to the constructor, which isn't optimal. On the other hand, the change makes it easier to use the class-based API, which I think is a good thing and on balance worth the small complexity cost.
Activity
jcrotts commentedon Jun 13, 2019
I'm not sure adding this to the group init is worth it. The API for group clearly asks for a dictionary of commands. I think making group accept a list or sequence complicates the API, and doesn't provide value outside of the slightly smaller user code.
Happy to review a PR on it though, if you think it does provide value to Click as a whole.
energizah commentedon Oct 8, 2019
Here's the PR.
I realize this adds a little bit of complexity to the constructor, which isn't optimal. On the other hand, the change makes it easier to use the class-based API, which I think is a good thing and on balance worth the small complexity cost.