Skip to content
Myr

Added a helper method to add help options and refactored the group decorator a bit.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 24b35b9 · Browse files · 2 files+7 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−2 removed

  • other:+7 added−2 removed

2 files+7 added−2 removed

modified:click/core.py+5 added-1 removed
275 unmodified lines
276 if short_help is None and help:277 short_help = make_default_short_help(help)278 self.short_help = short_help279 if add_help_option:280 help_option()(self)280 self.add_help_option()281282 def add_help_option(self):283 """Adds a help option to the command."""284 help_option()(self)285286 def iter_params_for_processing(self):287 """This returns an iterator over all attached parameters in the288 order of processing. This iterator returns all eager parameters289 first, followed by all non-eager parameters.
791 unmodified lines
modified:click/decorators.py+2 added-1 removed
112 unmodified lines
113 """Creates a new :class:`Group` with a function as callback. This114 works otherwise the same as :func:`command` just that the `cls`115 parameter is set to :class:`Group`.116 """117 attrs.setdefault('cls', Group)117 return command(name, cls=Group, **attrs)118 return command(name, **attrs)119120121def _param_memo(f, param):122 if isinstance(f, Command):
145 unmodified lines