Skip to content

Commit de987f6

Browse files
committed
chore(pre-commit): Update pre-commit hooks
Upgrade multiple pre-commit hooks to their latest versions for improved compatibility. Adjusted arguments where necessary to align with updated features or requirements.
1 parent ed73288 commit de987f6

File tree

2 files changed

+79
-10
lines changed

2 files changed

+79
-10
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
4+
rev: v5.0.0
55
hooks:
66
- id: check-docstring-first
77
- id: check-merge-conflict
@@ -14,14 +14,14 @@ repos:
1414
- id: requirements-txt-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/PyCQA/isort
17-
rev: 5.12.0
17+
rev: 6.0.1
1818
hooks:
1919
- id: isort
2020
args:
2121
- "--profile=black"
2222
exclude: ^.devcontainer/
2323
- repo: https://github.com/psf/black
24-
rev: 23.9.1
24+
rev: 25.1.0
2525
hooks:
2626
- id: black
2727
language_version: python3
@@ -33,22 +33,22 @@ repos:
3333
args:
3434
- "--py36-plus"
3535
- repo: https://github.com/PyCQA/flake8
36-
rev: 6.1.0
36+
rev: 7.2.0
3737
hooks:
3838
- id: flake8
3939
exclude: ^.devcontainer/
4040
- repo: https://github.com/asottile/pyupgrade
41-
rev: v3.15.0
41+
rev: v3.19.1
4242
hooks:
4343
- id: pyupgrade
4444
args:
45-
- "--py39-plus"
45+
- "--py310-plus"
4646
- repo: https://github.com/adrienverge/yamllint
47-
rev: v1.32.0
47+
rev: v1.37.1
4848
hooks:
4949
- id: yamllint
5050
- repo: https://github.com/econchick/interrogate
51-
rev: 1.5.0
51+
rev: 1.7.0
5252
hooks:
5353
- id: interrogate
5454
args: [--fail-under=90, --verbose]
@@ -59,13 +59,17 @@ repos:
5959
# - id: htmlhint
6060
# args: [--config, .htmlhintrc]
6161
- repo: https://github.com/igorshubovych/markdownlint-cli
62-
rev: v0.37.0
62+
rev: v0.44.0
6363
hooks:
6464
- id: markdownlint
6565
- repo: https://github.com/astral-sh/ruff-pre-commit
66-
rev: v0.0.292
66+
rev: v0.11.10
6767
hooks:
68+
# Run the linter.
6869
- id: ruff
70+
args: [--fix]
71+
# Run the formatter.
72+
- id: ruff-format
6973
#- repo: local
7074
# hooks:
7175
# - id: wily
@@ -84,3 +88,4 @@ repos:
8488
# args:
8589
# - --diff=git diff HEAD
8690
# - --no-summary
91+
...

ruff.toml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Ruff configuration
2+
####################
3+
4+
# Exclude a variety of commonly ignored directories.
5+
exclude = [
6+
".bzr",
7+
".direnv",
8+
".eggs",
9+
".git",
10+
".git-rewrite",
11+
".hg",
12+
".ipynb_checkpoints",
13+
".mypy_cache",
14+
".nox",
15+
".pants.d",
16+
".pyenv",
17+
".pytest_cache",
18+
".pytype",
19+
".ruff_cache",
20+
".svn",
21+
".tox",
22+
".venv",
23+
".vscode",
24+
"__pypackages__",
25+
"_build",
26+
"buck-out",
27+
"build",
28+
"dist",
29+
"node_modules",
30+
"site-packages",
31+
"venv",
32+
]
33+
34+
# Enforce line length and indent-width
35+
line-length = 120
36+
indent-width = 4
37+
38+
# Always generate Python 3.10-compatible code.
39+
target-version = "py310"
40+
41+
[lint]
42+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
43+
select = ["E4", "E7", "E9", "F"]
44+
ignore = []
45+
46+
# Allow fix for all enabled rules (when `--fix`) is provided.
47+
fixable = ["ALL"]
48+
unfixable = []
49+
50+
# Allow unused variables when underscore-prefixed.
51+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
52+
53+
[format]
54+
# Like Black, use double quotes for strings.
55+
quote-style = "double"
56+
57+
# Like Black, indent with spaces, rather than tabs.
58+
indent-style = "space"
59+
60+
# Like Black, respect magic trailing commas.
61+
skip-magic-trailing-comma = false
62+
63+
# Enforce UNIX line ending
64+
line-ending = "lf"

0 commit comments

Comments
 (0)