forked from Amsterdam/dataservices-airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
67 lines (67 loc) · 3.25 KB
/
.pre-commit-config.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File format: https://pre-commit.com/#plugins
# Supported hooks: https://pre-commit.com/hooks.html
# Running "make format" fixes most issues for you
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
additional_dependencies: [toml]
- repo: https://github.com/ambv/black
rev: 21.5b1
hooks:
- id: black
additional_dependencies:
- click==8.0.2 # Pin click, latest version is missing `_unicodefun` needed by black
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
exclude: migrations/
additional_dependencies:
- flake8-colors # ANSI colors highlight for Flake8
- flake8-raise # Find improvements for raise statements
- flake8-bandit # Security checks
- bandit<1.7.3 # pinning, because 1.7.3 is imcompatible, flake8-bandit needs to fix this
- flake8-bugbear # Assorted opinionated checks
- flake8-builtins # Check for name collision with builtins
- flake8-comprehensions # Write better list/set/dict comprehensions.
- flake8-docstrings # Uses pydocstyle to check docstrings
- flake8-implicit-str-concat #
- flake8-print # Check for Print statements in python files
- flake8-rst # Allows run flake8 on code snippets in docstrings or rst files
- flake8-string-format # str.format checker
- flake8-logging-format # Validate logging format strings
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-json # Checks json files for parseable syntax
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-toml # Checks toml files for parseable syntax
- id: check-yaml # Checks yaml files for parseable syntax
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls
- id: detect-private-key # Detects the presence of private keys
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
- id: trailing-whitespace # trims trailing whitespace
args: [--markdown-linebreak-ext=md]
- id: check-docstring-first # Checks a common error of defining a docstring after code
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy
language_version: python3
exclude: src/tests/
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.8.0 # Use the ref you want to point at
hooks:
- id: python-check-blanket-noqa # Enforce that noqa annotations always occur with specific codes
- 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: rst-backticks # Detect common mistake of using single backticks when writing rst
- id: rst-directive-colons # Detect mistake of rst directive not ending with double colon
- id: rst-inline-touching-normal # Detect mistake of inline code touching normal text in rst
- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
hooks:
- id: pyupgrade
args: [--py39-plus]