Skip to content

Commit 762efc2

Browse files
committed
flake8 + black → ruff
1 parent 56c1405 commit 762efc2

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
ci:
22
autoupdate_branch: devel
33
repos:
4-
- repo: https://github.com/PyCQA/flake8
5-
rev: 7.1.0
4+
- repo: https://github.com/astral-sh/ruff-pre-commit
5+
rev: v0.4.8
66
hooks:
7-
- id: flake8
7+
- id: ruff
8+
args:
9+
- --fix
10+
- --exit-non-zero-on-fix
11+
- --ignore
12+
- UP036
13+
- id: ruff-format
814
- repo: https://github.com/cheshirekow/cmake-format-precommit
915
rev: v0.6.13
1016
hooks:
1117
- id: cmake-format
18+
- repo: https://github.com/pappasam/toml-sort
19+
rev: v0.23.1
20+
hooks:
21+
- id: toml-sort-fix
1222
- repo: https://github.com/pre-commit/mirrors-clang-format
1323
rev: v18.1.8
1424
hooks:
@@ -30,8 +40,4 @@ repos:
3040
- id: end-of-file-fixer
3141
- id: mixed-line-ending
3242
- id: trailing-whitespace
33-
- repo: https://github.com/psf/black
34-
rev: 24.4.2
35-
hooks:
36-
- id: black
3743
exclude: tests/test_python-syntax_error.py

pyproject.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
[tool.isort]
2-
line_length = 88
1+
[tool.ruff]
2+
extend-exclude = ["cmake"]
3+
4+
[tool.ruff.lint]
5+
extend-select = ["I", "NPY", "RUF", "UP", "W"]
6+
7+
[tool.ruff.lint.isort]
8+
known-first-party = ["example_robot_data"]
9+
10+
[tool.tomlsort]
11+
all = true

setup.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)