generated from ydataai/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
75 lines (73 loc) · 2.33 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
minimum_pre_commit_version: 2.20.0
default_stages: [commit, push, manual]
ci:
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
name: Trim trailing whitespace
- id: end-of-file-fixer
exclude: ^.*\.egg-info/
name: End of file fixer
- id: check-merge-conflict
name: Check for merge conflict
- id: check-case-conflict
name: Check for case filename conflict
- id: check-json
name: Check JSON syntax
- id: check-toml
name: Check TOML syntax
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii, --no-sort-keys]
name: Pretty format JSON files
- id: check-ast
name: Python AST check
- id: debug-statements
name: Check for debugger statments
- id: check-docstring-first
name: Check docstring first
- id: detect-aws-credentials
args: [--allow-missing-credentials]
name: Detect AWS credentials
- id: detect-private-key
name: Detect private key
- id: forbid-new-submodules
name: Detect new git submodules
- id: mixed-line-ending
name: Check mixed line ending
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-mock-methods
name: Check mock mistakes
- id: python-use-type-annotations
name: Enforce type annotations instead of comments
- id: python-check-blanket-noqa
name: Enforce specifc code for noqua annotation
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
additional_dependencies: [setuptools]
args: [--all]
name: Remove unused imports (pycln)
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.7.0
hooks:
- id: autopep8
name: Code Formatter (autopep8)
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.15.0]
args: ["--max-line-length=88", "--extend-ignore=N803,N806,E501,Q000,W605"]
name: Code checker (flake8)
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--filter-files]
name: Import sorting (isort)