forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
80 lines (80 loc) · 2.55 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
68
69
70
71
72
73
74
75
76
77
78
79
80
repos:
- repo: https://github.com/python/black
rev: 20.8b1
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-comprehensions>=3.1.0]
- id: flake8
name: flake8 (cython)
types: [cython]
args: [--append-config=flake8/cython.cfg]
- id: flake8
name: flake8 (cython template)
files: \.pxi\.in$
types:
- file
args: [--append-config=flake8/cython-template.cfg]
- repo: https://github.com/PyCQA/isort
rev: 5.6.3
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.6.0
hooks:
- id: rst-backticks
- repo: local
hooks:
- id: pip_to_conda
name: Generate pip dependency from conda
description: This hook checks if the conda environment.yml and requirements-dev.txt are equal
language: python
entry: python -m scripts.generate_pip_deps_from_conda
files: ^(environment.yml|requirements-dev.txt)$
pass_filenames: false
additional_dependencies: [pyyaml]
- id: flake8-rst
name: flake8-rst
description: Run flake8 on code snippets in docstrings or RST files
language: python
entry: flake8-rst
types: [rst]
args: [--filename=*.rst]
additional_dependencies: [flake8-rst==0.7.0, flake8==3.7.9]
- id: incorrect-sphinx-directives
name: Check for incorrect Sphinx directives
language: pygrep
entry: >-
\.\. (autosummary|contents|currentmodule|deprecated
|function|image|important|include|ipython|literalinclude
|math|module|note|raw|seealso|toctree|versionadded
|versionchanged|warning):[^:]
files: \.(py|pyx|rst)$
- id: incorrect-code-directives
name: Check for incorrect code block or IPython directives
language: pygrep
entry: (\.\. code-block ::|\.\. ipython ::)
files: \.(py|pyx|rst)$
- repo: https://github.com/asottile/yesqa
rev: v1.2.2
hooks:
- id: yesqa
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: end-of-file-fixer
exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$
- id: trailing-whitespace
exclude: \.(html|svg)$