Skip to content

Commit 3139d25

Browse files
committed
replace isort with ruff
1 parent 3e0329d commit 3139d25

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ jobs:
1818
- name: Format check (Ruff)
1919
run: |
2020
ruff format --check
21+
ruff check

.pre-commit-config.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
rev: v0.5.7
44
hooks:
5+
- id: ruff
6+
args: [ --fix ]
57
- id: ruff-format
68
- repo: https://github.com/pre-commit/pre-commit-hooks
79
rev: v4.6.0
@@ -14,11 +16,6 @@ repos:
1416
- id: check-yaml
1517
- id: mixed-line-ending
1618
args: ['--fix=lf']
17-
- repo: https://github.com/PyCQA/isort
18-
rev: 5.13.2
19-
hooks:
20-
- id: isort
21-
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
2219
- repo: https://github.com/PyCQA/flake8
2320
rev: 7.1.1
2421
hooks:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ ignore-words-list = 'assertIn'
88
[tool.ruff]
99
line-length = 110
1010
exclude = [".tox", "oauth2_provider/migrations/", "tests/migrations/", "manage.py"]
11+
12+
[tool.ruff.lint]
13+
select = ["I", "Q"]

tox.ini

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ skip_install = True
9797
commands = flake8 {toxinidir}
9898
deps =
9999
flake8
100-
flake8-isort
101-
flake8-quotes
102100

103101
[testenv:migrations]
104102
setenv =
@@ -137,15 +135,3 @@ exclude = docs/, oauth2_provider/migrations/, tests/migrations/, .tox/, build/,
137135
application-import-names = oauth2_provider
138136
inline-quotes = double
139137
extend-ignore = E203, W503
140-
141-
[isort]
142-
default_section = THIRDPARTY
143-
known_first_party = oauth2_provider
144-
line_length = 110
145-
lines_after_imports = 2
146-
multi_line_output = 3
147-
include_trailing_comma = True
148-
force_grid_wrap = 0
149-
use_parentheses = True
150-
ensure_newline_before_comments = True
151-
skip = oauth2_provider/migrations/, .tox/, tests/migrations/

0 commit comments

Comments
 (0)