Skip to content

Commit

Permalink
Simplify linters using ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 28, 2023
1 parent 3c7ea20 commit 299cb36
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
1 change: 0 additions & 1 deletion .flake8

This file was deleted.

1 change: 0 additions & 1 deletion .isort.cfg

This file was deleted.

23 changes: 6 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
hooks:
- id: prettier
# https://github.com/prettier/prettier/issues/12143
exclude: "}$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-docstring-first
Expand All @@ -25,16 +21,9 @@ repos:
- id: mixed-line-ending
args: ["--fix=lf"]
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: pyupgrade
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: isort
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ pytest-xdist = "*"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

# ruff

[tool.ruff]
fix = true

[tool.ruff.lint]
extend-select = [
"UP", # pyupgrade
"I", # isort
]

0 comments on commit 299cb36

Please sign in to comment.