-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
27 lines (27 loc) · 1005 Bytes
/
.pre-commit-config.yaml
File metadata and controls
27 lines (27 loc) · 1005 Bytes
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
repos:
- repo: https://github.com/pycqa/flake8
rev: 7.1.1 # New version tags can be found here: https://github.com/pycqa/flake8/tags
hooks:
- id: flake8
name: flake8 (code linting)
- repo: https://github.com/psf/black
rev: 24.8.0 # New version tags can be found here: https://github.com/psf/black/tags
hooks:
- id: black
name: black (code formatting)
- repo: local
hooks:
- id: mypy
name: mypy (static typing)
pass_filenames: false
language: script
entry: ci/run_mypy.sh
verbose: true
- repo: local
hooks:
- id: generate-openapi-specs
name: Generate OpenAPI specs
files: '^flexmeasures/api|^flexmeasures/data/schemas'
pass_filenames: false
language: system
entry: bash -c '[[ "$GITHUB_ACTIONS" == "true" ]] && exit 0 || (export FLEXMEASURES_ENV=documentation; export FLEXMEASURES_PLUGINS=; python flexmeasures/api/scripts/generate_open_api_specs.py)'