-
Notifications
You must be signed in to change notification settings - Fork 44
/
.pre-commit-config.yaml
61 lines (55 loc) · 2.09 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
hooks:
- id: check-ast # checks Python syntax
- id: check-json # checks JSON syntax
- id: check-yaml # checks YAML syntax
- id: check-toml # checks TOML syntax
- id: end-of-file-fixer # checks there is a newline at the end of the file
- id: trailing-whitespace # trims trailing whitespace
- id: check-merge-conflict # checks for no merge conflict strings
- id: check-shebang-scripts-are-executable # checks all shell scripts have executable permissions
- id: mixed-line-ending # normalizes line endings
- id: no-commit-to-branch # prevents committing to main
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.3.3'
hooks:
- id: ruff
name: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
# same args as used in .github/workflows/linting.yml
args: [--install-types, --explicit-package-bases, --non-interactive]
exclude: docs/
- repo: local
hooks:
- id: pytest-check
name: pytest-check
# Needed because otherwise it seems to always run pytest in the git root.
entry: poetry run pytest lib/sycamore/sycamore/tests/unit apps/crawler/crawler/s3/tests/unit
# lib/remote-processors/remote_processors/test/unit
# not run here but via github actions because it requires a make step to happen first
# and it requires a poetry env setup also.
language: system
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: http-integration-test
name: http-integration-test
entry: bash apps/crawler/crawler/http/tests/http_crawler_integration.sh
language: system
pass_filenames: false
always_run: true
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
exclude: notebooks/ndd_example.ipynb