Skip to content

Commit

Permalink
use ruff+black chain for pre-commit lint & format
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed Sep 19, 2023
1 parent 4e5af7c commit c298709
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 359 deletions.
31 changes: 9 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,18 @@ repos:
doc/data/messages/t/trailing-newlines/bad.py|
)$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.290'
hooks:
- id: isort
exclude: doc/data/messages/(r/reimported|w/wrong-import-order|u/ungrouped-imports|m/misplaced-future|m/multiple-imports)/bad.py
- id: ruff
args: [ "--fix" ]

- repo: https://github.com/pylint-dev/pylint
rev: v3.0.0a7
# https://github.com/python/black#version-control-integration
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [ python ]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Link to your config file
]

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- id: black-jupyter

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
Expand Down
Loading

0 comments on commit c298709

Please sign in to comment.