public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gcc-patches@gcc.gnu.org,  libstdc++@gcc.gnu.org
Subject: Re: [RFC 0/2] black, isort, and flake8 configuration
Date: Thu, 04 Apr 2024 07:32:26 -0600	[thread overview]
Message-ID: <87a5m96yol.fsf@tromey.com> (raw)
In-Reply-To: <20231004165832.1750191-1-tromey@adacore.com> (Tom Tromey's message of "Wed, 4 Oct 2023 10:58:30 -0600")

>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> This short series adds configuration files for black ("opinionated"
Tom> code formatter), isort (import sorter) and flake8 (Python lint) to
Tom> libstdc++.

Tom> I marked it as RFC since sometimes people don't like black's output.
Tom> In gdb we use it -- at first I found some of its decisions a little
Tom> odd, but overall it's nice not to have to review for or worry about
Tom> the minitia of code formatting.

FWIW in gdb we recently updated our .pre-commit-config.yaml to
automatically run all three of these tools.  What this means is that
it's now very easy for developers to ensure that the Python code in the
tree remains clean -- is correctly formatted, passes flake8 checking, etc.

The tool is opt-in but also extremely easy to use.

Anyway, if you're at all interested, I could refresh this series to
enable flake8 cleanliness and then add a .pre-commit-config.yaml as well.

thanks,
Tom

      parent reply	other threads:[~2024-04-04 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 16:58 Tom Tromey
2023-10-04 16:58 ` [RFC 1/2] libstdc++: Use 'black' and 'isort' in pretty printers Tom Tromey
2023-10-04 16:58 ` [RFC 2/2] libstdc++: Add flake8 configuration Tom Tromey
2024-04-04 13:32 ` Tom Tromey [this message]

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=87a5m96yol.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).