Introduce ruff (eventually replacing autoflake, pyupgrade, flake8) (#86224)

This commit is contained in:
Aarni Koskela
2023-01-24 13:15:16 +02:00
committed by GitHub
parent df0c0297c8
commit bf41a971a2
9 changed files with 185 additions and 11 deletions

View File

@@ -1,9 +1,16 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.230
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py310-plus]
stages: [manual]
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
@@ -11,6 +18,7 @@ repos:
args:
- --in-place
- --remove-all-unused-imports
stages: [manual]
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
@@ -41,6 +49,7 @@ repos:
- flake8-noqa==1.3.0
- mccabe==0.7.0
exclude: docs/source/conf.py
stages: [manual]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks: