Skip to content

Instantly share code, notes, and snippets.

@NostraDavid
Created December 22, 2021 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NostraDavid/546da378fc26601e6788c075048dd3de to your computer and use it in GitHub Desktop.
Save NostraDavid/546da378fc26601e6788c075048dd3de to your computer and use it in GitHub Desktop.
A basic pre-commit config
---
repos:
# update the rev versions with a `pre-commit autoupdate`
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --expand-star-imports
- --remove-all-unused-imports
- --remove-unused-variables
- --recursive
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.2.1
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
exclude: ^notebooks/
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
args: [--safe, --quiet]
exclude: ^notebooks/
- repo: https://github.com/pycqa/flake8
rev: "4.0.1"
hooks:
- id: flake8
exclude: ^notebooks/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment