Skip to content

Commit 148a97e

Browse files
committed
Replace flake8 and isort with ruff
1 parent a87af59 commit 148a97e

File tree

5 files changed

+12
-27
lines changed

5 files changed

+12
-27
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,8 @@ repos:
3333
- "--line-length"
3434
- "119"
3535
exclude: ^django_fsm_log/migrations|^docs/
36-
- repo: https://github.com/pycqa/isort
37-
rev: 5.12.0
36+
- repo: https://github.com/charliermarsh/ruff-pre-commit
37+
# Ruff version.
38+
rev: 'v0.0.257'
3839
hooks:
39-
- id: isort
40-
exclude: ^django_fsm_log/migrations
41-
- repo: https://github.com/PyCQA/flake8
42-
rev: 6.0.0
43-
hooks:
44-
- id: flake8
45-
additional_dependencies:
46-
- flake8-bugbear
47-
- flake8-comprehensions
48-
- flake8-print
49-
- flake8-tidy-imports
50-
- flake8-typing-imports
51-
args:
52-
- "--max-line-length"
53-
- "119"
54-
exclude: ^django_fsm_log/migrations
40+
- id: ruff

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ tox
257257

258258
### Linting with pre-commit
259259

260-
We use flake8, isort, black and more, all configured and check via [pre-commit](https://pre-commit.com/).
260+
We use ruff black and more, all configured and check via [pre-commit](https://pre-commit.com/).
261261
Before committing, run the following:
262262

263263
```bash

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ profile = "black"
88
py_version = 310
99
line_length = 119
1010
skip_glob = "django_fsm_log/migrations/*"
11+
12+
[tool.ruff]
13+
line-length = 119
14+
target-version = "py310"
15+
select = ["E", "F", "I", "B", "C4", "T20", "TID"]
16+
exclude = ["django_fsm_log/migrations", ".tox", "build"]

setup.cfg

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,3 @@ markers =
66
ignore_article: Configure the settings DJANGO_FSM_LOG_IGNORED_MODELS to ignore
77
Article Model.
88
pending_objects: Install PendingStateLogManager on StateLog
9-
10-
[flake8]
11-
max_line_length = 119
12-
exclude =
13-
django_fsm_log/migrations/
14-
.tox/
15-
build/

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ envlist =
55
py{38,39,310}-dj-4.0
66
py{38,39,310}-dj-4.1
77
py{310}-dj-master
8-
flake8
8+
ruff
99

1010
[gh-actions]
1111
python =

0 commit comments

Comments
 (0)