Skip to content

Commit a0a5184

Browse files
committed
chore: add ruff and ty precommit
1 parent 64dc8ef commit a0a5184

2 files changed

Lines changed: 28 additions & 21 deletions

File tree

.pre-commit-config.yaml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v5.0.0
44
hooks:
55
- id: trailing-whitespace
66
exclude: .*\.edf
@@ -19,48 +19,54 @@ repos:
1919
args: ["--autofix", "--indent", "4", "--no-sort-keys"]
2020

2121
- repo: https://github.com/adrienverge/yamllint.git
22-
rev: v1.32.0
22+
rev: v1.37.1
2323
hooks:
2424
- id: yamllint
2525
args: ["-d {ignore: deploy/worker/.*yaml}", "-s"]
2626

2727
- repo: https://github.com/asottile/pyupgrade
28-
rev: v3.10.1
28+
rev: v3.20.0
2929
hooks:
3030
- id: pyupgrade
3131
args: ["--py3-plus", "--py310-plus"]
3232

33-
- repo: https://github.com/psf/black
34-
rev: 23.9.1
35-
hooks:
36-
- id: black
37-
3833
- repo: https://github.com/PyCQA/isort
39-
rev: 5.12.0
34+
rev: 6.0.1
4035
hooks:
4136
- id: isort
4237
args: ["--profile", "black"]
4338

44-
- repo: https://github.com/pycqa/flake8
45-
rev: 6.1.0
46-
hooks:
47-
- id: flake8
48-
additional_dependencies:
49-
- flake8-bugbear
50-
- flake8-simplify
51-
- flake8-black
52-
5339
- repo: https://github.com/PyCQA/bandit
54-
rev: 1.7.5
40+
rev: 1.8.6
5541
hooks:
5642
- id: bandit
5743
# .bandit config is not read when used by
5844
# pre-commit (ie with explicit file in input)
5945
# https://github.com/PyCQA/bandit/issues/332
6046
args: ["--skip", "B101"]
6147

48+
- repo: https://github.com/astral-sh/ruff-pre-commit
49+
# Ruff version.
50+
rev: v0.12.4
51+
hooks:
52+
# Run the linter.
53+
- id: ruff-check
54+
args: [ --fix ]
55+
# Run the formatter.
56+
- id: ruff-format
57+
58+
- repo: local
59+
hooks:
60+
- id: ty-check
61+
name: ty-check
62+
language: python
63+
entry: ty check
64+
pass_filenames: false
65+
args: [--python=.venv/]
66+
additional_dependencies: [ty]
67+
6268
- repo: https://github.com/pre-commit/mirrors-mypy
63-
rev: v1.5.1
69+
rev: v1.17.0
6470
hooks:
6571
- id: mypy
6672
types: [python]

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ dependencies = [
1616
dev = [
1717
"pytest",
1818
"pre-commit>=4.2.0",
19-
"black",
2019
"coverage",
2120
"ipython>=9.3.0",
21+
"ruff",
22+
"ty"
2223
]
2324

2425
[build-system]

0 commit comments

Comments
 (0)