Skip to content

Commit d5a0220

Browse files
authored
Upgrade lint tools, format with Ruff (#197)
1 parent b9c2903 commit d5a0220

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.pre-commit-config.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,21 @@ default_language_version:
44
python: python3
55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: v0.1.4
7+
rev: v0.4.0
88
hooks:
99
- id: ruff
1010
args: [--fix, --exit-non-zero-on-fix]
11-
- repo: https://github.com/psf/black
12-
rev: 23.10.1
13-
hooks:
14-
- id: black
11+
- id: ruff-format
1512
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v4.5.0
13+
rev: v4.6.0
1714
hooks:
1815
- id: check-ast
1916
- id: check-merge-conflict
2017
- id: detect-private-key
2118
- id: fix-encoding-pragma
2219
args: ["--remove"]
2320
- repo: https://github.com/adamchainz/django-upgrade
24-
rev: 1.15.0
21+
rev: 1.16.0
2522
hooks:
2623
- id: django-upgrade
2724
args:

allauth_2fa/ruff.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extend = "../pyproject.toml"
22

3-
[isort]
3+
[lint.isort]
44
required-imports = [
55
"from __future__ import annotations",
66
]

pyproject.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ include = [
8484

8585
[tool.ruff]
8686
target-version = "py38"
87+
88+
[tool.ruff.lint]
8789
exclude = [
8890
".git",
8991
".tox",
@@ -100,8 +102,8 @@ select = [
100102
"W",
101103
]
102104

103-
[tool.ruff.isort]
105+
[tool.ruff.lint.isort]
104106
force-single-line = true
105107

106-
[tool.ruff.per-file-ignores]
108+
[tool.ruff.lint.per-file-ignores]
107109
"tests/**" = ["S101", "S105"]

0 commit comments

Comments
 (0)