-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
99 lines (98 loc) · 2.95 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
exclude_types: ["*.geojson"]
exclude: ^(one_off_projects|landsat|platforms|sentinel2_postprocess_revamp|amazon_conservation|convert_satlas_webmercator_to_rslearn)/ # Exlcluding projects that have not been migrated to rslp
ci:
autofix_prs: false
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip: [end-of-file-fixer, equirements-txt-fixer]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: pretty-format-json
args: ["--autofix"]
- id: check-case-conflict
- id: check-docstring-first
- id: check-added-large-files
exclude: wheels/*
- id: check-ast
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-toml
- id: debug-statements
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy
args: [
--install-types,
--ignore-missing-imports,
--disallow-untyped-defs,
--ignore-missing-imports,
--non-interactive,
# --no-namespace-packages,
--namespace-packages,
]
additional_dependencies:
- "pydantic>=2.7.1,<3"
- "types-protobuf"
exclude: ./.*_pb2_.*.py
- repo: https://github.com/PyCQA/bandit
rev: "1.7.5"
hooks:
- id: bandit
exclude: ^tests/
args:
- -s
- B101,B311,B324,B108,B104
- repo: local
hooks:
- id: interrogate
name: interrogate
language: system
entry: interrogate
types: [python]
args:
[
--ignore-init-method,
--ignore-init-module,
-p,
-vv,
rslp,
--fail-under=80,
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
# - repo: https://github.com/hadolint/hadolint
# rev: v2.7.0
# hooks:
# - id: hadolint-docker
# name: Lint Dockerfiles
# description: Runs hadolint Docker image to lint Dockerfiles
# language: docker_image
# types: ["dockerfile"]
# entry: ghcr.io/hadolint/hadolint hadolint
# args: ["--ignore", "DL3008"]
# - repo: local
# hooks:
# - id: convert-list
# name: Convert List to list (note case)
# entry: python3 convert_List_to_list.py
# language: system
# types: [python] # Ensures it only runs on Python files
# files: \.py$ # Ensures it only runs on files with a .py extension