Groups
Groups
Sign in
Groups
Groups
Django updates
Conversations
About
Send feedback
Help
[Django] #35527: Support `ruff format` as a formatter alongside `black`
9 views
Skip to first unread message
Django
unread,
Jun 16, 2024, 5:55:47 AM
6/16/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35527: Support `ruff format` as a formatter alongside `black`
-------------------------------------+-------------------------------------
Reporter: Aarni | Owner: nobody
Koskela |
Type: New | Status: new
feature |
Component: Core | Version:
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35527
>
Django <
https://code.djangoproject.com/
>
The Web framework for perfectionists with deadlines.
Django
unread,
Jun 16, 2024, 1:43:54 PM
6/16/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#35527: Support `ruff format` as a formatter alongside `black`
-------------------------------------+-------------------------------------
Reporter: Aarni Koskela | Owner: nobody
Type: New feature | Status: closed
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* resolution: => wontfix
* status: new => closed
* version: => dev
Comment:
This was [
https://forum.djangoproject.com/t/alternative-formatters-for-
generated-code-like-ruff-format/26127/4 discussed] on the forum without
reaching a consensus, so marking as "wontfix" for now.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35527#comment:1
>
Reply all
Reply to author
Forward
0 new messages