Skip to content

Commit

Permalink
Standard pre-commit config (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Jan 16, 2023
1 parent bcd3669 commit 3cf8b9a
Show file tree
Hide file tree
Showing 4 changed files with 530 additions and 658 deletions.
98 changes: 56 additions & 42 deletions .pre-commit-config.yaml
@@ -1,43 +1,57 @@
default_language_version:
python: python3.11

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.8.5
hooks:
- id: reorder-python-imports
args:
- --py37-plus
- --application-directories
- .:example:src
- --add-import
- 'from __future__ import annotations'
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.3.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.7.0
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
hooks:
- id: mypy
additional_dependencies:
- black==22.12.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies:
- black==22.10.0
files: '\.rst$'
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
args:
- --py37-plus
- --application-directories
- .:example:src
- --add-import
- 'from __future__ import annotations'
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports
- flake8-typing-imports
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
additional_dependencies:
- black==22.12.0
- pytest==7.1.2

0 comments on commit 3cf8b9a

Please sign in to comment.