Skip to content
Myr

Set Command __doc__ string from the callback so Sphinx docs look nicer

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

authored by Ray Lehtiniemi · committed by Ray Lehtiniemi · parent cdb37dc · Browse files · 1 file+3 added−1 removed
This commit

State

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

Trailers

  • Signed-off-by: Ray Lehtiniemi <rayl@mail.com>

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:click/decorators.py+3 added-1 removed
109 unmodified lines
110 """111 if cls is None:112 cls = Command113 def decorator(f):114 return _make_command(f, name, attrs, cls)114 cmd = _make_command(f, name, attrs, cls)115 cmd.__doc__ = f.__doc__116 return cmd117 return decorator118119120def group(name=None, **attrs):
175 unmodified lines