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
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.
I like to use the class-based API for commands.
Group(commands=)
takes a dict mapping name to command. So I end up writing:It's a bit annoying to need the dict comprehension outside, so I'm wondering if you might take an addition in
__init__
, likeso that I could write
instead of
in all my scripts.
The text was updated successfully, but these errors were encountered: