-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
71 lines (64 loc) · 2.07 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
71 lines (64 loc) · 2.07 KB
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
---
# ----------------------------------------------------------------------------------
# This file contains pre-commit hooks containing rules under which the project files
# should be checked.
# ----------------------------------------------------------------------------------
exclude: .*/torchkan\.py
repos:
# A set of pre-commit hooks checking various file's features.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-added-large-files
- id: check-yaml
- id: debug-statements
- id: double-quote-string-fixer
- id: check-executables-have-shebangs
# Checks whether the python code's syntax conforms to the conventions of newer python versions.
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
# Makes sure the python code's format conforms to the PEP8 style guide.
- repo: local
hooks:
- id: autopep8
name: autopep8
entry: autopep8
language: system
types: [python]
# Makes sure the python variables are used according to their types.
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
args: [--python-executable, .venv/bin/python]
# Checks whether the code is accepted by the pylint checker.
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args:
- --rcfile=pyproject.toml
# Checks whether the python import statements are properly sorted.
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
args:
- --application-directories=.:src
# Ensures yaml files are formatted
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2']