forked from linkml/linkml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
35 lines (35 loc) · 1.42 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
35 lines (35 loc) · 1.42 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
default_language_version:
python: python3
# Specify files to exclude - pre-commit hook doesn't parse pyproject.toml
exclude: tests.*/data/hp.*\.ttl|.*\.svg|jsonschema_value_constraints.yaml|tests/linkml_runtime/test_loaders_dumpers/models/phenopackets.py|tests/linkml_runtime/.*\.yaml|tests/linkml_runtime/support/clicktestcase.py|tests/linkml/test_metamodel_compat/input/metamodel/.*\.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
exclude: __snapshots__
- id: check-yaml
exclude: (__snapshots__|test_utils/input)
- id: check-toml
- id: trailing-whitespace
# TODO: This is temporary while bioliank is being fixed upstream.
# TODO: Should look at snapshot exclusion to find upstream problems
# Exclude linkml_runtime model schemas to preserve exact formatting for snapshot tests
exclude: (__snapshots__|biolink-model.yaml|packages/linkml_runtime/src/linkml_runtime/linkml_model/model/schema/.*\.yaml)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ensure this version stays in sync with tox.ini
rev: v0.11.13
hooks:
# Run the linter.
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: .*\.toml$
args: ["--toml", "pyproject.toml"]
additional_dependencies:
- tomli