diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2022-02-13 13:31:41 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-02-13 14:38:27 +0100 |
commit | 2ec6e10c8eb87a6f4e2a49afd58485adb13702a5 (patch) | |
tree | 042411bdc547f8b7f002b29b6765eff82e425957 /.pre-commit-config.yaml | |
parent | [Core] Stopped using libtorrent deprecated functions (diff) | |
download | deluge-2ec6e10c8eb87a6f4e2a49afd58485adb13702a5.tar.xz deluge-2ec6e10c8eb87a6f4e2a49afd58485adb13702a5.zip |
[Lint] Update linter version and fix issues
Notable changes:
* Prettier >=2.3 with more consistent js assignments
* Black now formats docstrings
* Added isort to list of autoformaters
* Update flake8 config for v4
Ref: https://prettier.io/blog/2021/05/09/2.3.0.html
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r-- | .pre-commit-config.yaml | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0f0a5dbe..afe8ef923 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,30 +6,32 @@ exclude: > deluge/tests/data/.*svg| )$ repos: - - repo: https://github.com/ambv/black - rev: 20.8b1 + - repo: https://github.com/psf/black + rev: 22.1.0 hooks: - id: black name: Fmt Black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.2.1 + rev: v2.5.1 hooks: - id: prettier name: Fmt Prettier # Workaround to list modified files only. args: [--list-different] - - repo: https://gitlab.com/pycqa/flake8 - # v3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638 - rev: 3.7.9 + - repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + name: Fmt isort + - repo: https://github.com/pycqa/flake8 + rev: 4.0.1 hooks: - id: flake8 name: Chk Flake8 additional_dependencies: - - flake8-isort==4.0.0 - - pep8-naming==0.11.1 - args: [--isort-show-traceback] + - pep8-naming==0.12.1 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.1.0 hooks: - id: double-quote-string-fixer name: Fix Double-quotes @@ -42,7 +44,7 @@ repos: - id: trailing-whitespace name: Fix Trailing whitespace - repo: https://github.com/asottile/pyupgrade - rev: v2.29.1 + rev: v2.31.0 hooks: - id: pyupgrade args: [--py36-plus] |