diff mbox

list-fixed-bugs.py: Wrap at 72 chars

Message ID 20200201135009.380631-1-siddhesh@sourceware.org
State New
Headers show

Commit Message

Siddhesh Poyarekar Feb. 1, 2020, 1:50 p.m. UTC
Wrap the bug list output at 72 chars to make it easy to paste into
emails.
---
 scripts/list-fixed-bugs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

H.J. Lu Feb. 1, 2020, 3:19 p.m. UTC | #1
On Sat, Feb 1, 2020 at 5:52 AM Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
>
> Wrap the bug list output at 72 chars to make it easy to paste into
> emails.
> ---
>  scripts/list-fixed-bugs.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/list-fixed-bugs.py b/scripts/list-fixed-bugs.py
> index e83af23b0b..5255817fbd 100755
> --- a/scripts/list-fixed-bugs.py
> +++ b/scripts/list-fixed-bugs.py
> @@ -48,7 +48,7 @@ def list_fixed_bugs(version):
>      data = json.loads(json_data)
>      for bug in data['bugs']:
>          desc = '[%d] %s: %s' % (bug['id'], bug['component'], bug['summary'])
> -        desc = textwrap.fill(desc, width=76, initial_indent='  ',
> +        desc = textwrap.fill(desc, width=72, initial_indent='  ',
>                               subsequent_indent='    ') + '\n'
>          sys.stdout.buffer.write(desc.encode('utf-8'))
>
> --
> 2.24.1
>

LGTM.
Joseph Myers Feb. 3, 2020, 8:43 p.m. UTC | #2
On Sat, 1 Feb 2020, Siddhesh Poyarekar wrote:

> Wrap the bug list output at 72 chars to make it easy to paste into
> emails.

The logic of 76 is that it matches

fill-column: 76

in the NEWS file.  I'd expect the same width to be used for both the bug 
list and manually-written content.
diff mbox

Patch

diff --git a/scripts/list-fixed-bugs.py b/scripts/list-fixed-bugs.py
index e83af23b0b..5255817fbd 100755
--- a/scripts/list-fixed-bugs.py
+++ b/scripts/list-fixed-bugs.py
@@ -48,7 +48,7 @@  def list_fixed_bugs(version):
     data = json.loads(json_data)
     for bug in data['bugs']:
         desc = '[%d] %s: %s' % (bug['id'], bug['component'], bug['summary'])
-        desc = textwrap.fill(desc, width=76, initial_indent='  ',
+        desc = textwrap.fill(desc, width=72, initial_indent='  ',
                              subsequent_indent='    ') + '\n'
         sys.stdout.buffer.write(desc.encode('utf-8'))