-
Notifications
You must be signed in to change notification settings - Fork 30
/
.pre-commit-config.yaml
75 lines (75 loc) · 2.53 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
repos:
- repo: local
hooks:
- id: sync-dependencies
name: update pre-commit-config
entry: uv run ci/scripts/pre_commit_sync_pyright_deps.py
language: system
files: "(pyproject.toml|scripts/.pre-commit-config.yaml.template|.pre-commit.config.yaml)" # the quotes are here to make sure that this stay in line for the formatter.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
exclude: |
(?x)^(
test/resources/config/config_with_duplicate_parameters_3.yaml
)$
- id: check-added-large-files
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
name: pyupgrade
args: [--py38-plus]
exclude: .*\/__main__.py # typer doesn't supper PEP604 yet, so let's stick to the old typing
- id: pyupgrade
name: pyupgrade (__main__.py)
args: [--py38-plus, --keep-runtime-typing]
files: .*\/__main__.py # We run ruff after pyugprade to remove unused imports
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
- id: ruff # Run the linter.
args: [--fix]
- id: ruff # Sort improts
name: sort imports with ruff
args: [--select, I, --fix]
- id: ruff-format # Run the formatter.
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.377
hooks:
- id: pyright
additional_dependencies: # these dependencies are synced via the first hook
- numpy>=1.15; python_version < '3.13'
- numpy>=2.1; python_version >= '3.13'
- pymongo>=4.1
- pandas>=2.2
- sacred>=0.8.4
- pyyaml>=5.1
- jsonpickle>=2.2
- munch>=4.0
- debugpy>=1.2.1
- requests>=2.28.1
- typer>=0.12
- rich>=13.0
- omegaconf>=2.3.0
- gitignore_parser>=0.1.11
- setuptools>=69.2.0
- importlib_resources>=5.7.0
- typing_extensions>=4.10; python_version < '3.13'
- typing_extensions>=4.12; python_version >= '3.13'
- deepdiff>=7.0.1
- ruff>=0.6.1
- pytest>=8.3.2
- pre-commit>=3.8.0
- filelock>=3.15.4
- sshtunnel>=0.4.0
- build>=1.2.1
- twine>=5.1.1
- backports-tarfile>=1.2.0
- tuna>=0.5.11
files: src/seml/.*\.py