-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
46 lines (46 loc) · 1.74 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
# See documentation at: https://pre-commit.com/
# You can update your hooks with ``pre-commit autoupdate`` on the command line.
# Note these require access to external GitHub for cloning the repos used as hooks.
# The tests and docs directories are ignored for some hooks.
exclude: ^(notebooks|demo)
repos:
# Black: format Python code
# https://github.com/psf/black/blob/master/.pre-commit-hooks.yaml
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
types: [file, python]
language_version: python3
# Isort: sort import statements
# https://github.com/timothycrosley/isort/blob/develop/.pre-commit-hooks.yaml
# The setup.cfg holds the compatible config for use with black
# https://github.com/psf/black/blob/master/docs/compatible_configs.md#isort
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
language_version: python3
# Flake8: complexity and style checking
# https://flake8.pycqa.org/en/latest/user/using-hooks.html
# - repo: https://github.com/pycqa/flake8
# rev: 4.0.1
# hooks:
# - id: flake8
# additional_dependencies: [flake8-docstrings]
# exclude: (^tests/|^docs/)
# language_version: python3
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.782
# hooks:
# - id: mypy
# exclude: (^tests/|^docs/)
# language_version: python3
# General fixers: format files for white spaces and trailing new lines, warn on debug statements
# https://github.com/pre-commit/pre-commit-hooks#hooks-available
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: trailing-whitespace
- id: debug-statements
- id: end-of-file-fixer