Skip to content

Commit a999844

Browse files
committed
Update pre-commit with ruff
1 parent 2d12ea9 commit a999844

File tree

4 files changed

+20
-37
lines changed

4 files changed

+20
-37
lines changed

.flake8

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[flake8]
2-
3-
max-line-length = 120
2+
select=FCN,M511
43

54
exclude =
65
doc,

.isort.cfg

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

.pre-commit-config.yaml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,8 @@ default_language_version:
22
python: python3
33

44
repos:
5-
- repo: https://github.com/PyCQA/autoflake
6-
rev: "v2.1.1"
7-
hooks:
8-
- id: autoflake
9-
args:
10-
- --in-place
11-
- --remove-unused-variables
12-
- --remove-all-unused-imports
13-
14-
- repo: https://github.com/hadialqattan/pycln
15-
rev: "v2.1.5"
16-
hooks:
17-
- id: pycln
18-
19-
- repo: https://github.com/PyCQA/isort
20-
rev: "5.12.0"
21-
hooks:
22-
- id: isort
23-
24-
- repo: https://github.com/psf/black
25-
rev: "23.3.0"
26-
hooks:
27-
- id: black
28-
295
- repo: https://github.com/pre-commit/pre-commit-hooks
30-
rev: "v4.4.0"
6+
rev: "v4.5.0"
317
hooks:
328
- id: check-merge-conflict
339
- id: debug-statements
@@ -36,19 +12,25 @@ repos:
3612
- id: end-of-file-fixer
3713
- id: check-ast
3814
- id: check-builtin-literals
15+
- id: check-docstring-first
16+
- id: check-toml
3917

4018
- repo: https://github.com/PyCQA/flake8
41-
rev: "6.0.0"
19+
rev: "6.1.0"
4220
hooks:
4321
- id: flake8
44-
args: [--max-line-length=120]
4522
additional_dependencies: [
4623
"git+https://github.com/RedHatQE/flake8-plugins.git",
47-
"pep8-naming",
4824
"flake8-mutable",
4925
]
5026

5127
- repo: https://github.com/Yelp/detect-secrets
5228
rev: v1.4.0
5329
hooks:
5430
- id: detect-secrets
31+
32+
- repo: https://github.com/astral-sh/ruff-pre-commit
33+
rev: v0.1.5
34+
hooks:
35+
- id: ruff
36+
- id: ruff-format

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[tool.ruff]
2+
preview = true
3+
line-length = 120
4+
fix = true
5+
output-format = "grouped"
6+
7+
[tool.ruff.format]
8+
exclude = [".git", ".venv", ".mypy_cache", ".tox", "__pycache__"]
9+
skip-magic-trailing-comma = true

0 commit comments

Comments
 (0)