diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2024-02-19 18:52:47 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2024-09-08 18:46:40 +0200 |
commit | 90c5e75373b9bcba1730ea8f8dcb39b3236748d3 (patch) | |
tree | 8e7cdcbf3f60616f2fddd4425056642e4f3b1f2d /.pre-commit-config.yaml | |
parent | [Console] Block interactive-mode on Windows even with windows-curses (diff) | |
download | deluge-90c5e75373b9bcba1730ea8f8dcb39b3236748d3.tar.xz deluge-90c5e75373b9bcba1730ea8f8dcb39b3236748d3.zip |
[Lint] Replace black/flake8/isort with ruff
Use ruff as a single performant tool to lint and format Python code.
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r-- | .pre-commit-config.yaml | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d0d922ef..84d82235c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,11 +6,15 @@ exclude: > deluge/tests/data/.*svg| )$ repos: - - repo: https://github.com/psf/black - rev: 23.1.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.6.4 hooks: - - id: black - name: Fmt Black + - id: ruff + name: Chk Ruff + args: [--fix] + - id: ruff-format + name: Fmt Ruff - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.7.1 hooks: @@ -18,23 +22,9 @@ repos: name: Fmt Prettier # Workaround to list modified files only. args: [--list-different] - - repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - name: Fmt isort - - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - name: Chk Flake8 - additional_dependencies: - - pep8-naming==0.12.1 - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - - id: double-quote-string-fixer - name: Fix Double-quotes - id: end-of-file-fixer name: Fix End-of-files exclude_types: [javascript, css] @@ -47,5 +37,5 @@ repos: rev: v3.3.1 hooks: - id: pyupgrade - args: [--py36-plus] + args: [--py37-plus] stages: [manual] |