mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maarten ter Huurne <maarten@treewalker.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	John Hubbard <jhubbard@nvidia.com>
Cc: Dave Airlie <airlied@gmail.com>, Miguel Ojeda <ojeda@kernel.org>,
	Sima Vetter <sima@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] drm for 6.18-rc1
Date: Sun, 05 Oct 2025 23:31:03 +0200	[thread overview]
Message-ID: <3771775.lGaqSPkdTl@hyperion> (raw)
In-Reply-To: <bd004ac5-9e51-4e90-a3a4-025d74941a38@nvidia.com>

On Saturday 4 October 2025 03:53:34 CEST John Hubbard wrote:

> The main complaint with rustfmt is that it is extremely twitchy and
> unstable with respect to one-line, vs. multi-line output.
> 
> *Especially* with "use" statements.

The Black and Ruff formatting tools for Python use a "magic comma" rule 
that works well in practice: if the last item has a trailing comma, the 
items are guaranteed to be formatted multi-line, while if there is no 
trailing comma, single-line formatting is attempted.

I couldn't find documentation of the feature itself, but there is a 
settings flag to turn it off that contains an example:

https://docs.astral.sh/ruff/settings/#format_skip-magic-trailing-comma

Bye,
		Maarten




  parent reply	other threads:[~2025-10-05 21:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01  4:06 Dave Airlie
2025-10-01 20:25 ` Danilo Krummrich
2025-10-02 19:53 ` Linus Torvalds
2025-10-02 21:04   ` Miguel Ojeda
2025-10-04  1:53     ` John Hubbard
2025-10-04  2:17       ` Linus Torvalds
2025-10-04  9:36       ` Miguel Ojeda
2025-10-05 21:31       ` Maarten ter Huurne [this message]
2025-10-05 21:33         ` Linus Torvalds
2025-10-07 17:21           ` Miguel Ojeda
2025-10-07 18:35             ` Linus Torvalds
2025-10-07 19:24               ` Miguel Ojeda
2025-10-10 17:56               ` Miguel Ojeda
2025-10-03  9:13   ` Geert Uytterhoeven
2025-10-03 10:52   ` Dave Airlie
2025-10-03 18:09     ` Linus Torvalds
2025-10-03 20:02       ` Linus Torvalds
2025-10-03 20:30         ` Linus Torvalds
2025-10-04 14:39         ` Sasha Levin
2025-10-02 20:00 ` pr-tracker-bot

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=3771775.lGaqSPkdTl@hyperion \
    --to=maarten@treewalker.org \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=sima@ffwll.ch \
    --cc=torvalds@linux-foundation.org \
    /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

Powered by JetHome