Skip to content
Myr

Merge branch '4.x-maintenance'

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

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents 3b766a8, 7ec17e4 · Browse files · 3 files+23 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+23 added−1 removed

  • tests:+21 added−0 removed
  • other:+2 added−1 removed

3 files+23 added−1 removed

modified:click/formatting.py+1 added-1 removed
18 unmodified lines
192021def add_subsequent_indent(text, subsequent_indent):22 lines = text.splitlines()23 lines = [lines[0]] + [subsequent_indent + line for line in lines[1:]]23 lines = lines[:1] + [subsequent_indent + line for line in lines[1:]]24 return '\n'.join(lines)252627def wrap_text(text, width=78, initial_indent='', subsequent_indent='',
224 unmodified lines
modified:tests/test_formatting.py+21 added
85 unmodified lines
86 '',87 'Options:',88 ' --help Show this message and exit.',89 ]909192def test_formatting_empty_help_lines(runner):93 @click.command()94 def cli():95 """Top level command9697 """9899 result = runner.invoke(cli, ['--help'])100 assert not result.exception101 assert result.output.splitlines() == [102 'Usage: cli [OPTIONS]',103 '',104 ' Top level command',105 '',106 '',107 '',108 'Options:',109 ' --help Show this message and exit.',110 ]
modified:CHANGES+1 added
14 unmodified lines
1516(bugfix release, release date yet to be decided)1718- Fix a bug where error messages would include a trailing `None` string.19- Fix a bug where Click would crash on docstrings with trailing newlines.2021Version 4.022-----------23
207 unmodified lines