-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
45 lines (42 loc) · 1.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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed
- id: check-ast # Checks whether the files parse as valid python.
- id: check-case-conflict # Checks for files that would conflict in case-insensitive filesystems.
- id: check-json # Attempts to load all json files to verify syntax
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-symlinks # Checks for symlinks which do not point to anything
- id: check-xml # Attempts to load all xml files to verify syntax
- id: check-yaml # Attempts to load all yaml files to verify syntax
- id: debug-statements # Check for debugger imports and py37+ breakpoint() calls in python source
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: no-commit-to-branch # Protect specific branches from direct checkins (`master` by default)
stages: [commit]
- id: trailing-whitespace # Trims trailing whitespace.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies:
- types-requests
- types-python-dateutil
- mypy-boto3-s3
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.9
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: local-hooks # Run pre-commit with a local configuration file if it exists
name: local-hooks
language: system
entry: bash -c "if test -f .pre-commit-config.local.yaml; then pre-commit
run --config .pre-commit-config.local.yaml; fi"
require_serial: true # Do not try to split files into batches