Skip to content

Commit 617274f

Browse files
committed
Update hooks
1 parent db4df68 commit 617274f

File tree

2 files changed

+47
-49
lines changed

2 files changed

+47
-49
lines changed

.pre-commit-config.yaml

+7-7
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: v4.5.0
4+
rev: v4.6.0
55
hooks:
66
- id: check-added-large-files
77
- id: check-builtin-literals
@@ -14,7 +14,7 @@ repos:
1414
- id: mixed-line-ending
1515
- id: trailing-whitespace
1616
- repo: https://github.com/adamchainz/django-upgrade
17-
rev: 1.16.0
17+
rev: 1.20.0
1818
hooks:
1919
- id: django-upgrade
2020
args: [--target-version, "3.2"]
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: absolufy-imports
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.3.2"
26+
rev: "v0.6.2"
2727
hooks:
2828
- id: ruff
2929
- id: ruff-format
@@ -34,15 +34,15 @@ repos:
3434
args: [--list-different, --no-semi]
3535
exclude: "^conf/|.*\\.html$"
3636
- repo: https://github.com/biomejs/pre-commit
37-
rev: "v0.1.0"
37+
rev: "v0.4.0"
3838
hooks:
3939
- id: biome-check
40-
additional_dependencies: ["@biomejs/biome@1.7.3"]
40+
additional_dependencies: ["@biomejs/biome@1.8.3"]
4141
- repo: https://github.com/tox-dev/pyproject-fmt
42-
rev: 1.7.0
42+
rev: 2.2.1
4343
hooks:
4444
- id: pyproject-fmt
4545
- repo: https://github.com/abravalheri/validate-pyproject
46-
rev: v0.16
46+
rev: v0.19
4747
hooks:
4848
- id: validate-pyproject

pyproject.toml

+40-42
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ requires = [
88
name = "form-designer"
99
description = "Form Designer"
1010
readme = "README.rst"
11-
license = {text= "BSD-3-Clause"}
11+
license = { text = "BSD-3-Clause" }
1212
authors = [
13-
{ name = "Matthias Kestenholz", email = "[email protected]" },
13+
{ name = "Matthias Kestenholz", email = "[email protected]" },
1414
]
1515
requires-python = ">=3.9"
1616
classifiers = [
@@ -36,80 +36,78 @@ dependencies = [
3636
"django-admin-ordering",
3737
"xlsxdocument",
3838
]
39-
[project.optional-dependencies]
40-
tests = [
39+
optional-dependencies.tests = [
4140
"coverage",
4241
"django-mptt",
4342
"django-recaptcha>=4",
44-
"FeinCMS",
43+
"feincms",
4544
]
46-
[project.urls]
47-
Homepage = "https://github.com/feincms/form-designer/"
45+
urls.Homepage = "https://github.com/feincms/form-designer/"
4846

4947
[tool.hatch.version]
5048
path = "form_designer/__init__.py"
5149

5250
[tool.hatch.build]
53-
include = ["/form_designer"]
51+
include = [ "/form_designer" ]
5452

5553
[tool.ruff]
54+
target-version = "py39"
55+
56+
fix = true
57+
show-fixes = true
5658
lint.extend-select = [
57-
# pyflakes, pycodestyle
58-
"F", "E", "W",
59-
# mmcabe
60-
"C90",
61-
# isort
62-
"I",
63-
# pep8-naming
64-
"N",
65-
# pyupgrade
66-
"UP",
67-
# flake8-2020
68-
"YTT",
69-
# flake8-boolean-trap
70-
"FBT",
7159
# flake8-bugbear
7260
"B",
7361
# flake8-comprehensions
7462
"C4",
63+
# mmcabe
64+
"C90",
7565
# flake8-django
7666
"DJ",
77-
# flake8-implicit-string-concatenation
78-
"ISC",
79-
# flake8-pie
80-
"PIE",
81-
# flake8-simplify
82-
"SIM",
67+
"E",
68+
# pyflakes, pycodestyle
69+
"F",
70+
# flake8-boolean-trap
71+
"FBT",
72+
# isort
73+
"I",
8374
# flake8-gettext
8475
"INT",
76+
# flake8-implicit-string-concatenation
77+
"ISC",
78+
# pep8-naming
79+
"N",
8580
# pygrep-hooks
8681
"PGH",
82+
# flake8-pie
83+
"PIE",
8784
# pylint
88-
"PLC", "PLE", "PLW",
85+
"PLC",
86+
"PLE",
87+
"PLW",
8988
# unused noqa
9089
"RUF100",
90+
# flake8-simplify
91+
"SIM",
92+
# pyupgrade
93+
"UP",
94+
"W",
95+
# flake8-2020
96+
"YTT",
9197
]
9298
lint.extend-ignore = [
9399
# Allow zip() without strict=
94100
"B905",
95101
# No line length errors
96102
"E501",
103+
"UP031",
97104
]
98-
fix = true
99-
show-fixes = true
100-
target-version = "py39"
101-
102-
[tool.ruff.lint.isort]
103-
combine-as-imports = true
104-
lines-after-imports = 2
105-
106-
[tool.ruff.lint.mccabe]
107-
max-complexity = 15
108-
109-
[tool.ruff.lint.per-file-ignores]
110-
"*/migrat*/*" = [
105+
lint.per-file-ignores."*/migrat*/*" = [
111106
# Allow using PascalCase model names in migrations
112107
"N806",
113108
# Ignore the fact that migration files are invalid module names
114109
"N999",
115110
]
111+
lint.isort.combine-as-imports = true
112+
lint.isort.lines-after-imports = 2
113+
lint.mccabe.max-complexity = 15

0 commit comments

Comments
 (0)