Opened 5 months ago

Closed 5 months ago

#35527 closed New feature (wontfix)

Support `ruff format` as a formatter alongside `black`

Reported by: Aarni Koskela Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django already has support for plugging in code formatters (https://github.com/django/django/blob/fa7848146738a9fe1d415ee4808664e54739eeb7/django/core/management/utils.py#L160-L175) for generated code (templates and migrations).

The ruff (https://github.com/astral-sh/ruff) project has a 99% black-compatible formatter (https://astral.sh/blog/the-ruff-formatter) that's very fast and increasingly popular.

It would be useful if Django could format migrations using ruff format if available.

If this is welcome, I'm happy to write a PR.

Change History (1)

comment:1 by Mariusz Felisiak, 5 months ago

Resolution: wontfix
Status: newclosed
Version: dev

This was discussed on the forum without reaching a consensus, so marking as "wontfix" for now.

Note: See TracTickets for help on using tickets.
Back to Top