forked from capitalone/DataProfiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
71 lines (71 loc) · 2.79 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
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.12.0
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: (^docs/|^dataprofiler/tests/|^.*/__init__.py)
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: v4.0.1
hooks:
- id: trailing-whitespace
exclude: (^dataprofiler/tests/data/|^dataprofiler/tests/speed_tests/data/)
- id: debug-statements
- id: end-of-file-fixer
exclude: (^dataprofiler/tests/data/)
# Mypy: Optional static type checking
# https://github.com/pre-commit/mirrors-mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
hooks:
- id: mypy
exclude: (^dataprofiler/tests/|^resources/|^examples|venv*/)
language_version: python3
additional_dependencies: ['types-setuptools', 'types-python-dateutil',
'types-requests', 'types-chardet', 'types-six', 'numpy']
# Check-manifest: ensures required non-Python files are included in MANIFEST.in
# https://github.com/mgedmin/check-manifest/blob/master/.pre-commit-hooks.yaml
- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
hooks:
- id: check-manifest
additional_dependencies: ['h5py', 'wheel', 'future', 'numpy', 'pandas',
'python-dateutil', 'pytz', 'pyarrow', 'chardet', 'fastavro',
'python-snappy', 'charset-normalizer', 'psutil', 'scipy', 'requests',
'networkx','typing-extensions']
# Pyupgrade - standardize and modernize Python syntax for newer versions of the language
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
# Autoflake - cleanup unused variables and imports
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
args:
- "--in-place"
- "--ignore-pass-statements"