forked from Materials-Consortia/optimade-python-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
executable file
·53 lines (48 loc) · 1.45 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
default_language_version:
python: python3.10
repos:
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
name: Blacken
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-symlinks
- id: check-yaml
name: Check YAML
- id: check-json
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: requirements-txt-fixer
name: Fix requirements*.txt
files: ^requirements.*\.txt$
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.275'
hooks:
- id: ruff
args: [--fix]
- repo: local
hooks:
- id: json-diff
name: OpenAPI diff
description: Check for differences in openapi.json and index_openapi.json with local versions.
entry: invoke check-openapi-diff
pass_filenames: false
language: python
- id: update-docs-api-reference
name: Update API Reference in Documentation
entry: invoke create-api-reference-docs --pre-clean --pre-commit
language: python
pass_filenames: false
files: ^optimade/.*\.py$
description: Update the API Reference documentation whenever a Python file is touched in the code base.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy
name: "MyPy"
additional_dependencies: ["types-all", "pydantic~=1.10"]