Skip to content

Commit

Permalink
Use ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 27, 2023
1 parent b502537 commit 26a0cea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 34 deletions.
39 changes: 7 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,17 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.1
hooks:
- id: autoflake
args:
- --in-place
- --ignore-init-module-imports
- --remove-all-unused-imports
- --remove-duplicate-keys
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: "6.0.0"
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear==22.8.23"]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/docformatter
rev: v1.5.1
hooks:
- id: docformatter
args: ["--in-place", "--wrap-summaries=88"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.3
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
- id: ruff-format
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,10 @@ exclude_lines = [
"if TYPE_CHECKING:",
]

[tool.isort]
profile = "black"
# ruff

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

0 comments on commit 26a0cea

Please sign in to comment.