Skip to content
Myr

Fixes exception in Option.get_help_record() for option with multiple, show_default and default list

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

authored by Ulrich Petri · committed by Ulrich Petri · parent 17bbb9e · Browse files · 1 file+4 added−1 removed
This commit

State

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

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:click/core.py+4 added-1 removed
1507 unmodified lines
15081509 help = self.help or ''1510 extra = []1511 if self.default is not None and self.show_default:1512 extra.append('default: %s' % self.default)1512 extra.append('default: %s' % (1513 ', '.join('%s' % d for d in self.default)1514 if isinstance(self.default, (list, tuple))1515 else self.default, ))1516 if self.required:1517 extra.append('required')1518 if extra:1519 help = '%s[%s]' % (help and help + ' ' or '', '; '.join(extra))
113 unmodified lines