Skip to content

Commit a70c194

Browse files
Chore: update ruff and pre-commit hook (#381)
* chore: updated pyproject.toml to solve warnings * ci: updated ruff-pre-commit version hook
1 parent 8f5c0ae commit a70c194

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ repos:
1414
- id: check-merge-conflict
1515
- id: mixed-line-ending
1616

17-
- repo: https://github.com/charliermarsh/ruff-pre-commit
18-
rev: "v0.0.264"
17+
- repo: https://github.com/astral-sh/ruff-pre-commit
18+
rev: v0.2.1
1919
hooks:
2020
- id: ruff
2121
args: [--fix, --exit-non-zero-on-fix]

pyproject.toml

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
[tool.ruff]
2-
# https://beta.ruff.rs/docs/configuration/
2+
exclude = [
3+
".eggs",
4+
".git",
5+
".mypy_cache",
6+
".ruff_cache",
7+
".env",
8+
".venv",
9+
"**migrations/**",
10+
"node_modules",
11+
"venv",
12+
]
313
line-length = 120
14+
15+
[tool.ruff.lint]
16+
# https://beta.ruff.rs/docs/configuration/
417
select = [
518
"E", # pycodestyle errors
619
"W", # pycodestyle warnings
@@ -15,18 +28,6 @@ select = [
1528
"UP", # pyupgrade
1629
]
1730

18-
exclude = [
19-
".eggs",
20-
".git",
21-
".mypy_cache",
22-
".ruff_cache",
23-
".env",
24-
".venv",
25-
"**migrations/**",
26-
"node_modules",
27-
"venv",
28-
]
29-
3031
ignore = [
3132
"B006", # Do not use mutable data structures for argument defaults
3233
"B011", # tests use assert False
@@ -43,12 +44,12 @@ ignore = [
4344
"UP007", # Use `X | Y` for type annotations
4445
]
4546

46-
[tool.ruff.per-file-ignores]
47+
[tool.ruff.lint.per-file-ignores]
4748
"__init__.py" = [
4849
"F401" # unused-import
4950
]
5051

51-
[tool.ruff.isort]
52+
[tool.ruff.lint.isort]
5253
combine-as-imports = true
5354
known-first-party = [
5455
"djangocms_versioning",

0 commit comments

Comments
 (0)