diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c090a6c0..638f1026 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,15 @@ ci: autofix_prs: false repos: - - repo: https://github.com/asottile/reorder-python-imports - rev: v3.12.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.3.7 hooks: - - id: reorder-python-imports - args: - - --application-directories=.:wrapanapi - - repo: https://github.com/psf/black - rev: 23.12.1 - hooks: - - id: black - args: [--safe, --quiet, --line-length, "100"] - require_serial: true + # Run the linter. + - id: ruff + args: [ --fix ] + # Run the formatter. + - id: ruff-format - repo: https://github.com/PyCQA/flake8 rev: 7.0.0 hooks: @@ -21,13 +18,13 @@ repos: - --max-line-length=100 - --ignore=W503,E203 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.2 hooks: - id: pyupgrade args: [--py3-plus, --py311-plus]