Skip to content

Instantly share code, notes, and snippets.

@wheelercj
Last active October 3, 2023 18:39
Show Gist options
  • Save wheelercj/ec2e044647d7dcfdd8251059bb08188b to your computer and use it in GitHub Desktop.
Save wheelercj/ec2e044647d7dcfdd8251059bb08188b to your computer and use it in GitHub Desktop.
pre-commit config for Python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- --max-line-length=88
- --ignore=E203
- --per-file-ignores=*/__init__.py:F401
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies: []
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment