Update pre-commit config to follow best practices

https://github.com/pre-commit/pre-commit/issues/1790
This commit is contained in:
Ethan Paul 2021-02-09 20:20:47 -05:00
parent 46b8fcc2a4
commit ee5df2f17a
No known key found for this signature in database
GPG Key ID: C5F5542B54A4D9C6

View File

@ -13,36 +13,57 @@
# by the Poetry-managed dependency. # by the Poetry-managed dependency.
# #
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: local
rev: v3.3.0
hooks: hooks:
- id: end-of-file-fixer - id: end-of-file-fixer
name: end-of-file-fixer
entry: end-of-file-fixer
language: system language: system
types:
- text
- id: fix-encoding-pragma - id: fix-encoding-pragma
name: fix-encoding-pragma
entry: fix-encoding-pragma
language: system
args: args:
- "--remove" - "--remove"
types:
- python
- id: trailing-whitespace-fixer
name: trailing-whitespace-fixer
entry: trailing-whitespace-fixer
language: system language: system
- id: trailing-whitespace types:
language: system - text
- id: check-merge-conflict - id: check-merge-conflict
name: check-merge-conflict
entry: check-merge-conflict
language: system language: system
types:
- text
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language: system
- repo: https://github.com/asottile/blacken-docs
rev: v1.8.0
hooks:
- id: blacken-docs
language: system
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.3.6
hooks:
- id: reorder-python-imports - id: reorder-python-imports
name: reorder-python-imports
entry: reorder-python-imports
language: system
args: args:
- "--unclassifiable-application-module=tox_poetry_installer" - "--unclassifiable-application-module=tox_poetry_installer"
types:
- python
- id: black
name: black
entry: black
language: system language: system
types:
- python
- id: blacken-docs
name: blacken-docs
entry: blacken-docs
language: system
types:
- text