2024-03-01 10:09:30 -08:00
|
|
|
default_language_version:
|
|
|
|
|
python: python3.11
|
|
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-11-11 01:07:01 -08:00
|
|
|
rev: v5.0.0
|
2024-03-01 10:09:30 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: check-added-large-files
|
2025-01-15 14:20:28 -08:00
|
|
|
args: ['--maxkb=15000']
|
2024-03-08 01:21:49 -05:00
|
|
|
exclude: 'inputs.*|skyvern_demo_video\.mp4|demo_visualizer.mp4'
|
2024-03-01 10:09:30 -08:00
|
|
|
- id: check-byte-order-marker
|
|
|
|
|
- id: check-case-conflict
|
|
|
|
|
- id: check-merge-conflict
|
|
|
|
|
- id: check-symlinks
|
|
|
|
|
- id: debug-statements
|
|
|
|
|
- id: detect-private-key
|
2024-05-16 18:20:11 -07:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
|
|
|
# Ruff version.
|
2025-01-14 14:06:43 -08:00
|
|
|
rev: v0.9.1
|
2024-05-16 18:20:11 -07:00
|
|
|
hooks:
|
|
|
|
|
# Run the linter.
|
|
|
|
|
- id: ruff
|
|
|
|
|
args: [--fix]
|
2025-02-19 00:58:48 +08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)(
|
2025-02-19 01:30:59 +08:00
|
|
|
^skyvern/client/.*
|
2025-02-19 00:58:48 +08:00
|
|
|
)
|
2024-05-16 18:20:11 -07:00
|
|
|
# Run the formatter.
|
|
|
|
|
- id: ruff-format
|
2024-03-01 10:09:30 -08:00
|
|
|
- repo: https://github.com/pycqa/isort
|
2024-05-16 17:11:49 -07:00
|
|
|
rev: 5.13.2
|
2024-03-01 10:09:30 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: isort
|
|
|
|
|
language_version: python3.11
|
2025-02-19 00:58:48 +08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)(
|
2025-03-30 18:34:48 -07:00
|
|
|
^skyvern/client/.*|
|
|
|
|
|
^skyvern/__init__.py
|
2025-02-19 00:58:48 +08:00
|
|
|
)
|
2024-03-01 10:09:30 -08:00
|
|
|
|
|
|
|
|
- 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/pre-commit/mirrors-mypy
|
2025-01-14 14:06:43 -08:00
|
|
|
rev: v1.14.1
|
2024-03-01 10:09:30 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: mypy
|
|
|
|
|
args: [--show-error-codes, --warn-unused-configs, --disallow-untyped-calls, --disallow-untyped-defs, --disallow-incomplete-defs, --check-untyped-defs, --python-version=3.11]
|
|
|
|
|
additional_dependencies:
|
|
|
|
|
- requests
|
|
|
|
|
- types-requests
|
|
|
|
|
- types-cachetools
|
|
|
|
|
- alembic
|
2024-03-24 22:55:38 -07:00
|
|
|
- "sqlalchemy[mypy]"
|
|
|
|
|
- types-PyYAML
|
2024-10-31 23:10:11 +08:00
|
|
|
- types-aiofiles
|
2024-03-01 10:09:30 -08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)(
|
|
|
|
|
^tests.*|
|
|
|
|
|
^streamlit_app.*|
|
2025-02-19 00:58:48 +08:00
|
|
|
^alembic.*|
|
2025-02-19 01:30:59 +08:00
|
|
|
^skyvern/client/.*
|
2024-03-01 10:09:30 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/PyCQA/autoflake
|
2024-05-16 17:11:49 -07:00
|
|
|
rev: v2.3.1
|
2024-03-01 10:09:30 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: autoflake
|
|
|
|
|
name: autoflake
|
|
|
|
|
entry: autoflake --in-place --remove-all-unused-imports --recursive --ignore-init-module-imports
|
|
|
|
|
language: python
|
|
|
|
|
types: [ python ]
|
2025-02-19 00:58:48 +08:00
|
|
|
exclude: |
|
|
|
|
|
(?x)(
|
2025-02-19 01:30:59 +08:00
|
|
|
^skyvern/client/.*
|
2025-02-19 00:58:48 +08:00
|
|
|
)
|
2024-03-01 10:09:30 -08:00
|
|
|
# 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
|
2024-05-16 17:11:49 -07:00
|
|
|
rev: "v4.0.0-alpha.8" # Use the sha or tag you want to point at
|
2024-03-01 10:09:30 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: prettier
|
|
|
|
|
types: [javascript]
|
|
|
|
|
- repo: https://github.com/thlorenz/doctoc
|
|
|
|
|
rev: v2.2.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: doctoc
|
2025-05-13 00:09:03 -04:00
|
|
|
args: [--notitle]
|
2024-03-01 10:09:30 -08:00
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: alembic-check
|
|
|
|
|
name: Alembic Check
|
|
|
|
|
entry: ./run_alembic_check.sh
|
|
|
|
|
language: script
|
2025-05-20 19:43:33 -04:00
|
|
|
stages: [ pre-commit ]
|