-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy path.pre-commit-config.yaml
30 lines (29 loc) · 1.01 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
default_stages: [pre-push]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies:
[types-pkg-resources==0.1.3, types-all, wandb>=0.15.5]
# Note: You have to update pyproject.toml[tool.mypy] too!
args: ['--config-file=pyproject.toml']
exclude: (.*pyi$)|(weave_query)|(tests)|(examples)
# This is legacy Weave when we were building a notebook product - should be removed
- repo: local
hooks:
- id: jupyter-nb-clear-output
name: jupyter-nb-clear-output
files: ^examples/.*\.ipynb$
language: system
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace