[Django] #34460: Replace Flake8 by Ruff

9 views
Skip to first unread message

Django

unread,
Apr 5, 2023, 8:30:45 AM4/5/23
to django-...@googlegroups.com
#34460: Replace Flake8 by Ruff
-------------------------------------+-------------------------------------
Reporter: Obi | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: 4.2
Severity: Normal | Keywords: Linter Ruff Flake8
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Flake8 is quite slow and limited as a Linter.

Ruff is more modern, complete and way faster.
https://github.com/charliermarsh/ruff

Here's a pull request to add Ruff Configuration to Django
https://github.com/django/django/pull/16730

I configured it so that all errors he was able to detect are now in the
ignored list.
All those were detected in less than one second.

--
Ticket URL: <https://code.djangoproject.com/ticket/34460>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 5, 2023, 8:54:43 AM4/5/23
to django-...@googlegroups.com
#34460: Replace Flake8 by Ruff
-------------------------------------+-------------------------------------
Reporter: Obi | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Utilities | Version: 4.2
Severity: Normal | Resolution: wontfix

Keywords: Linter Ruff Flake8 | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Sanders):

* status: new => closed
* resolution: => wontfix


Comment:

Didn't felixx already reject the PR :D

Ruff may one day become the defacto standard over flake8 at which point it
could be worth revisiting.

--
Ticket URL: <https://code.djangoproject.com/ticket/34460#comment:1>

Django

unread,
Apr 5, 2023, 1:21:06 PM4/5/23
to django-...@googlegroups.com
#34460: Replace Flake8 by Ruff
-------------------------------------+-------------------------------------
Reporter: Obi | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Utilities | Version: 4.2
Severity: Normal | Resolution: wontfix
Keywords: Linter Ruff Flake8 | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Obi):

Replying to [comment:1 David Sanders]:


> Didn't felixx already reject the PR :D
>
> Ruff may one day become the defacto standard over flake8 at which point
it could be worth revisiting.

Sorry, I didn't want to waste both your time, I just wanted to be sure I
tried everything for my first contribution to my most beloved tool. :D
I thought you would be interested by Ruff detection results.
Feel free to re-open this ticket if one day you change your mind.
I would love to finish what I started by integrating it to the CI and to
use it to improve Django's code.
Keep up the good work. ;)

--
Ticket URL: <https://code.djangoproject.com/ticket/34460#comment:2>

Reply all
Reply to author
Forward
0 new messages