Skip to content

Commit 4203e25

Browse files
committed
Update pre-commit hooks
1 parent 248e2b6 commit 4203e25

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: ".yarn/|yarn.lock|\\.min\\.(css|js)$"
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v5.0.0
4+
rev: v6.0.0
55
hooks:
66
- id: check-added-large-files
77
- id: check-builtin-literals
@@ -14,26 +14,27 @@ repos:
1414
- id: mixed-line-ending
1515
- id: trailing-whitespace
1616
- repo: https://github.com/adamchainz/django-upgrade
17-
rev: 1.22.2
17+
rev: 1.25.0
1818
hooks:
1919
- id: django-upgrade
2020
args: [--target-version, "3.2"]
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: "v0.9.3"
22+
rev: "v0.12.10"
2323
hooks:
2424
- id: ruff
25+
args: [--unsafe-fixes]
2526
- id: ruff-format
2627
- repo: https://github.com/biomejs/pre-commit
27-
rev: "v0.6.1"
28+
rev: "v2.2.2"
2829
hooks:
2930
- id: biome-check
30-
additional_dependencies: ["@biomejs/[email protected]"]
3131
args: [--unsafe]
32+
verbose: true
3233
- repo: https://github.com/tox-dev/pyproject-fmt
33-
rev: v2.5.0
34+
rev: v2.6.0
3435
hooks:
3536
- id: pyproject-fmt
3637
- repo: https://github.com/abravalheri/validate-pyproject
37-
rev: v0.23
38+
rev: v0.24.1
3839
hooks:
3940
- id: validate-pyproject

biome.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3-
"organizeImports": {
4-
"enabled": false
5-
},
2+
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
3+
"assist": { "actions": { "source": { "organizeImports": "off" } } },
64
"formatter": {
75
"enabled": true,
86
"indentStyle": "space",
@@ -15,19 +13,22 @@
1513
"a11y": {
1614
"noSvgWithoutTitle": "off"
1715
},
16+
"complexity": {
17+
"noImportantStyles": "off"
18+
},
1819
"correctness": {
1920
"noUndeclaredVariables": "error",
2021
"noUnusedImports": "error",
2122
"noUnusedVariables": "error",
22-
"useArrayLiterals": "error",
2323
"useHookAtTopLevel": "error"
2424
},
2525
"security": {
2626
"noDangerouslySetInnerHtml": "warn"
2727
},
2828
"style": {
2929
"noParameterAssign": "off",
30-
"useForOf": "warn"
30+
"useForOf": "warn",
31+
"useArrayLiterals": "error"
3132
},
3233
"suspicious": {
3334
"noArrayIndexKey": "warn",

tests/testapp/test_custom_fields.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
from django.forms import modelform_factory
2+
from django.forms import CharField, modelform_factory
33
from django.utils.translation import override
44

55
from testapp.custom_fields import CustomPathTextField
@@ -202,7 +202,6 @@ def test_custom_path_field_form_generation():
202202

203203
# Form field is based on standard Django form fields - these assertions should pass
204204
# Django maps TextField to Textarea widget by default
205-
from django.forms import CharField
206205

207206
assert isinstance(field_en, CharField)
208207
assert field_en.widget.__class__.__name__ == "Textarea"

0 commit comments

Comments
 (0)