Skip to content

Commit 891992c

Browse files
committed
Migrate to ruff completely
1 parent 636abd6 commit 891992c

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ repos:
3131
- id: django-upgrade
3232
args: [--target-version, "6.1"]
3333

34-
- repo: https://github.com/psf/black-pre-commit-mirror
35-
rev: 26.5.1
36-
hooks:
37-
- id: black
38-
3934
- repo: https://github.com/rbubley/mirrors-prettier
4035
rev: v3.7.4
4136
hooks:
@@ -45,11 +40,6 @@ repos:
4540
exclude_types: [html, json, scss]
4641
exclude: '(^djangoproject\/static\/js\/lib\/.*$|^checklists\/templates\/.*$)'
4742

48-
- repo: https://github.com/pycqa/flake8
49-
rev: 7.3.0
50-
hooks:
51-
- id: flake8
52-
5343
- repo: https://github.com/astral-sh/ruff-pre-commit
5444
rev: v0.16.3
5545
hooks:

ruff.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[lint]
2-
select = [
2+
extend-select = [
33
# For flake8 compatibility.
44
# Explicit definition of the rule can be removed after the full migration.
55
# https://docs.astral.sh/ruff/rules/lambda-assignment/
@@ -11,3 +11,8 @@ select = [
1111
# https://github.com/asottile/pyupgrade
1212
"UP",
1313
]
14+
[lint.per-file-ignores]
15+
# RUF012 is violated by Django-generated migrations.
16+
# https://docs.astral.sh/ruff/rules/mutable-class-default/
17+
# TODO: Fix existing issues, update the migration template and remove this exception
18+
"**/migrations/*" = ["RUF012"]

0 commit comments

Comments
 (0)