Skip to content
Myr

Fixed an incorrectly formatted help text for count options.

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 dc99ea4 · Browse files · 3 files+6 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

3 files+6 added−1 removed

  • tests:+3 added−0 removed
  • other:+3 added−1 removed

3 files+6 added−1 removed

modified:click/core.py+1 added-1 removed
1198 unmodified lines
1199 def _write_opts(opts):1200 rv, any_slashes = join_options(opts)1201 if any_slashes:1202 any_prefix_is_slash[:] = [True]1203 if not self.is_flag:1203 if not self.is_flag and not self.count:1204 rv += ' ' + self.make_metavar()1205 return rv12061207 rv = [_write_opts(self.opts)]
124 unmodified lines
modified:tests/test_options.py+3 added
39 unmodified lines
40 result = runner.invoke(cli, [])41 assert not result.exception42 assert result.output == 'verbosity=0\n'4344 result = runner.invoke(cli, ['--help'])45 assert re.search('-v\s+Verbosity', result.output) is not None464748@pytest.mark.parametrize('unknown_flag', ['--foo', '-f'])49def test_unknown_options(runner, unknown_flag):50 @click.command()51 def cli():
155 unmodified lines
modified:CHANGES+2 added
6 unmodified lines
7-----------89(bugfix release, release date to be decided)1011- Fixed an incorrectly formatted help record for count options.'1213Version 2.214-----------1516(bugfix release, released on June 26th 2014)
77 unmodified lines