summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-02 21:19:56 +0100
committerGitHub <noreply@github.com>2023-03-02 21:19:56 +0100
commit4de654512e8c1219046f2f49664b6c9f66946e84 (patch)
tree6b7b4dd14e48198829080f98893925481c2a7011 /.pre-commit-config.yaml
parentb5aab35a6f20efad94ae8da07392fad6d1c28aad (diff)
downloadpylint-git-4de654512e8c1219046f2f49664b6c9f66946e84.tar.gz
[pre-commit] Transition from flake8/autoflake to ruff (#8372)
ruff is faster and support pyproject.toml. flake8-typing-import is not implemented but it checks for things in python version < 3.7.2 that we do not support.
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml32
1 files changed, 7 insertions, 25 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 6e4cc35e4..5d67d407d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,23 +15,19 @@ repos:
doc/data/messages/t/trailing-newlines/bad.py|
doc/data/messages/m/missing-final-newline/bad.py|
)$
- - repo: https://github.com/PyCQA/autoflake
- rev: v2.0.1
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
+ rev: "v0.0.253"
hooks:
- - id: autoflake
+ - id: ruff
+ args: ["--fix"]
exclude: &fixtures tests(/\w*)*/functional/|tests/input|doc/data/messages|tests(/\w*)*data/
- args:
- - --in-place
- - --remove-all-unused-imports
- - --expand-star-imports
- - --remove-duplicate-keys
- - --remove-unused-variables
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.253"
hooks:
- id: ruff
- args: ["--fix"]
- exclude: *fixtures
+ name: line-length-doc
+ files: doc/data/messages
+ args: ["--config", "doc/data/ruff.toml"]
- repo: https://github.com/Pierre-Sassoulas/copyright_notice_precommit
rev: 0.1.2
hooks:
@@ -60,20 +56,6 @@ repos:
rev: v1.1.3
hooks:
- id: black-disable-checker
- - repo: https://github.com/PyCQA/flake8
- rev: 6.0.0
- hooks:
- - id: flake8
- additional_dependencies:
- [flake8-bugbear==23.1.20, flake8-typing-imports==1.14.0]
- exclude: *fixtures
- - repo: https://github.com/PyCQA/flake8
- rev: 6.0.0
- hooks:
- - id: flake8
- name: line-length-doc
- files: doc/data/messages
- args: ["--config", "doc/data/.flake8"]
- repo: local
hooks:
- id: pylint