-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
134 lines (134 loc) · 3.92 KB
/
.pre-commit-config.yaml
File metadata and controls
134 lines (134 loc) · 3.92 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=15000']
exclude: 'inputs.*|skyvern_demo_video\.mp4|demo_visualizer.mp4'
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: detect-private-key
- repo: local
hooks:
- id: check-python-version
name: Check Python Version (3.11-3.13)
entry: uv run python -c "import sys; assert (3,11) <= sys.version_info[:2] <= (3,13), f'Python {sys.version_info[:2]} not supported. Use Python 3.11-3.13'"
language: system
pass_filenames: false
always_run: true
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.1
hooks:
# Run the linter.
- id: ruff
args: [--fix]
exclude: |
(?x)(
^skyvern/client/.*
)
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
- id: isort
language_version: python3
exclude: |
(?x)(
^skyvern/client/.*|
^skyvern/__init__.py
)
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-log-warn
- id: python-use-type-annotations
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
exclude: |
(?x)(
^skyvern/client/.*
)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
args: [--show-error-codes, --warn-unused-configs, --disallow-untyped-calls, --disallow-untyped-defs, --disallow-incomplete-defs, --check-untyped-defs]
additional_dependencies:
- requests
- types-requests
- types-cachetools
- alembic
- 'sqlalchemy[mypy]'
- types-PyYAML
- types-toml
- types-redis
- types-aiofiles
exclude: |
(?x)(
^tests.*|
^streamlit_app.*|
^alembic.*|
^skyvern/client/.*
)
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
name: autoflake
entry: autoflake --in-place --remove-all-unused-imports --recursive --ignore-init-module-imports
language: python
types: [python]
exclude: |
(?x)(
^skyvern/client/.*
)
# Mono repo has bronken this TODO: fix
# - id: pytest-check
# name: pytest-check
# entry: pytest
# language: system
# pass_filenames: false
# always_run: true
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v4.0.0-alpha.8' # Use the sha or tag you want to point at
hooks:
- id: prettier
types: [javascript]
- repo: local
hooks:
- id: frontend-precommit
name: Frontend Precommit (lint-staged)
entry: bash -c 'cd skyvern-frontend && npm run precommit'
language: system
files: ^skyvern-frontend/src/
pass_filenames: false
- id: vitest-type-check
name: vitest
entry: bash -c 'cd skyvern-frontend && ([ -d node_modules ] || npm ci) && npm run test'
language: system
pass_filenames: false
files: ^skyvern-frontend/
- id: alembic-check
name: Alembic Check
entry: ./run_alembic_check.sh
language: script
stages: [manual]
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
- repo: https://github.com/google/yamlfmt
rev: v0.17.2
hooks:
- id: yamlfmt