Skip to content

Commit 9e8cc1f

Browse files
authored
maint: add ruff (#101)
1 parent 6b4b066 commit 9e8cc1f

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020

21-
- repo: https://github.com/pycqa/isort
22-
rev: 5.12.0
21+
- repo: https://github.com/astral-sh/ruff-pre-commit
22+
rev: v0.1.4
2323
hooks:
24-
- id: isort
25-
26-
- repo: https://github.com/psf/black
27-
rev: 23.10.0
28-
hooks:
29-
- id: black
30-
31-
- repo: https://github.com/PyCQA/flake8
32-
rev: 6.1.0
33-
hooks:
34-
- id: flake8
35-
additional_dependencies: [flake8-bugbear~=22.7]
24+
- id: ruff
25+
args: ["--fix", "--show-fixes"]
26+
- id: ruff-format
3627

3728
- repo: https://github.com/pre-commit/mirrors-mypy
3829
rev: v1.6.1

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ strict_equality = true
7171
module = ["docutils.*", "yaml.*"]
7272
ignore_missing_imports = true
7373

74-
[tool.isort]
75-
profile = "black"
76-
src_paths = ["sphinx_external_toc", "tests"]
74+
75+
[tool.ruff.lint.isort]
76+
force-sort-within-sections = true

0 commit comments

Comments
 (0)