Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>,
	Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
Cc: Lancelot SIX <lsix@lancelotsix.com>
Subject: Re: Proposal: format GDB Python files with black
Date: Fri, 30 Apr 2021 13:14:12 -0400	[thread overview]
Message-ID: <4e80b144-0701-9240-f216-0cc23982379c@polymtl.ca> (raw)
In-Reply-To: <87h7jnwvnp.fsf@tromey.com>



On 2021-04-30 1:04 p.m., Tom Tromey wrote:
>>>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Lancelot> Another option can be to use 'black' to
> Lancelot> help format the code and 'pycodestyle'[3] to do the automated checks,
> Lancelot> but I am not sure this is the way you want to go to, introducing more
> Lancelot> and more tools.
> 
> Doing some kind of checking like this would be good as well.
> We've used pycodestyle internally a bit, but recently (-ish) moved to
> flake8.  I don't know why we made the switch or which static checker is
> preferable, though.


I have used flake8 for a long time, I'm happy with it.  It does find
some real bugs, like a variable being referenced without being assigned,
things like that, so it has real value.

> Lancelot> I’d also like to point out that by default, 'black' will use 88 char
> Lancelot> long lines[4], which is not compliant with the PEP8[5], which is, as you
> Lancelot> pointed out[1], referenced in GDB's wiki[6].  Either the tool's
> Lancelot> configuration or the standard can be adjusted, depending on the
> Lancelot> maintainers preferences.
> 
> We only really chose PEP8 because it existed; not out of some deeper
> liking for it or anything like that.  So personally I'm fine with just
> switching to a tool.

Although PEP8 specifies more than just formatting, like naming
convention and things like that.  So for the wiki, which mentions PEP8
currently, I plan on saying something like "Use black for the
formatting.  For the rest, follow PEP8.".

Let's just use black's default line length.  I certainly don't want to
start a discussion on line length, and I don't see any reason to deviate
from the default.

Simon

  reply	other threads:[~2021-04-30 17:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 15:55 Simon Marchi via Gdb-patches
2021-04-26 16:21 ` Andrew Burgess
2021-04-26 17:25   ` Simon Marchi via Gdb-patches
2021-04-26 17:50     ` Andrew Burgess
2021-04-26 18:08       ` Simon Marchi via Gdb-patches
2021-04-27  7:54         ` Andrew Burgess
2021-04-27 13:21           ` Simon Marchi via Gdb-patches
2021-04-26 17:42   ` Tom Tromey
2021-04-26 17:34 ` Paul Koning via Gdb-patches
2021-04-26 17:44   ` Simon Marchi via Gdb-patches
2021-04-26 17:48     ` Simon Marchi via Gdb-patches
2021-04-26 17:39 ` Tom Tromey
2021-04-30 16:26   ` Joel Brobecker
2021-04-26 22:40 ` Lancelot SIX via Gdb-patches
2021-04-30 17:04   ` Tom Tromey
2021-04-30 17:14     ` Simon Marchi via Gdb-patches [this message]
2021-05-01  6:42       ` Joel Brobecker
2021-04-30 17:21 ` Luis Machado via Gdb-patches
2021-05-08 16:00 ` Tom Tromey
2021-05-11  2:55   ` Simon Marchi via Gdb-patches
2021-05-11  2:57     ` Using clang-format Simon Marchi via Gdb-patches
2021-05-11 13:31       ` Marco Barisione via Gdb-patches
2021-05-11 13:44         ` Simon Marchi via Gdb-patches
2021-05-11 20:40       ` Tom Tromey
2021-05-13 17:13         ` Simon Marchi via Gdb-patches
2021-05-11 11:38     ` Proposal: format GDB Python files with black Luis Machado via Gdb-patches
2021-05-11 13:49       ` Simon Marchi via Gdb-patches
2021-05-11 14:23         ` Luis Machado via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e80b144-0701-9240-f216-0cc23982379c@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=lsix@lancelotsix.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox