forked from sonic-net/sonic-mgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (63 loc) · 1.94 KB
/
.pre-commit-config.yaml
File metadata and controls
69 lines (63 loc) · 1.94 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: sdn_tests/pins_ondatra/bazel/patches/.*\.patch$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: ["--max-line-length=120"]
exclude: ^spytest/|^tests/common2/
- id: flake8
files: ^spytest/.*
args: ["--max-line-length=120", "--ignore=E1,E2,E3,E5,E7,W5"]
- id: flake8
name: flake8 (tests/common2)
files: ^tests/common2/.*
args: ["--max-line-length=120", "--ignore=E1,E2,E3,E5,W1,W2,W3,W5"]
- repo: https://github.com/sonic-net/sonic-mgmt
rev: 1.0.2+pre_commit
hooks:
- id: check-conditional-mark-sort
##
# The following hooks are specific to the tests/common2 directory
##
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort
name: isort (python)
files: ^tests/common2/
args: ["--profile", "black"]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
# arguments are specified in pyproject.toml
- id: black
files: ^tests/common2/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
# arguments are specified in pyproject.toml
- id: mypy
files: ^tests/common2/
additional_dependencies: ["types-PyYAML", "types-six", "types-paramiko", "types-requests"]
# it is recommended to run pylint locally unlike other hooks
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
require_serial: true
args: [--rcfile=pylintrc]
files: ^tests/common2/