-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
35 lines (32 loc) · 1.86 KB
/
.pre-commit-config.yaml
File metadata and controls
35 lines (32 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: check-yaml # Checks yaml files for parseable syntax
- id: check-added-large-files # Prevent giant files from being committed
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
exclude:
requirements.txt
- id: fix-encoding-pragma # Add # -*- coding: utf-8 -*- to the top of python files
- id: mixed-line-ending # Replaces or checks mixed line ending
- id: trailing-whitespace # Trims trailing whitespace
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black # Python code formatter
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.5.1
hooks:
- id: python-check-blanket-noqa # Enforce that `noqa` annotations always occur with specific codes
- id: python-check-mock-methods # Prevent common mistakes of `assert mck.not_called()`, `assert mck.called_once_with(...)` and `mck.assert_called`
- id: python-no-eval # A quick check for the `eval()` built-in function
- id: python-no-log-warn # A quick check for the deprecated `.warn()` method of python loggers
- id: python-use-type-annotations # Enforce that python3.6+ type annotations are used instead of type comments
- repo: https://github.com/timothycrosley/isort
rev: 5.4.2
hooks:
- id: isort # Sort and organize Python imports
args: [ -m=3 , -tc , -l 100 ]