|
1 | 1 | fail_fast: true
|
2 | 2 | repos:
|
3 |
| -- repo: local |
4 |
| - hooks: |
5 |
| - - id: black |
6 |
| - name: black |
7 |
| - entry: poetry run black |
8 |
| - language: system |
9 |
| - types: [file, python] |
10 |
| - - id: isort |
11 |
| - name: isort |
12 |
| - entry: poetry run isort |
13 |
| - language: system |
14 |
| - types: [file, python] |
15 |
| - - id: ruff |
16 |
| - name: ruff |
17 |
| - entry: poetry run ruff check --fix |
18 |
| - language: system |
19 |
| - types: [file, python] |
20 |
| - - id: bandit |
21 |
| - name: bandit |
22 |
| - entry: poetry run bandit -c pyproject.toml -r . |
23 |
| - language: system |
24 |
| - types: [file, python] |
25 |
| - - id: xenon |
26 |
| - name: xenon |
27 |
| - entry: bash -c "poetry run xenon -a $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['average'])\") -b $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['block'])\") -m $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['module'])\") . " |
28 |
| - language: system |
29 |
| - types: [file, python] |
30 |
| - - id: mypy |
31 |
| - name: mypy |
32 |
| - entry: poetry run mypy --no-namespace-packages --exclude esgf_playground_utils/models/__init__.py |
33 |
| - language: system |
34 |
| - types: [ file, python ] |
| 3 | + - repo: https://github.com/python-poetry/poetry |
| 4 | + rev: '1.8.3' # add version here |
| 5 | + hooks: |
| 6 | + - id: poetry-check |
| 7 | + - id: poetry-lock |
| 8 | + - repo: local |
| 9 | + hooks: |
| 10 | + - id: black |
| 11 | + name: black |
| 12 | + entry: poetry run black |
| 13 | + language: system |
| 14 | + types: [ file, python ] |
| 15 | + - id: isort |
| 16 | + name: isort |
| 17 | + entry: poetry run isort |
| 18 | + language: system |
| 19 | + types: [ file, python ] |
| 20 | + - id: ruff linter |
| 21 | + name: ruff lint |
| 22 | + entry: poetry run ruff check --fix |
| 23 | + language: system |
| 24 | + types: [ file, python ] |
| 25 | + - id: bandit |
| 26 | + name: bandit |
| 27 | + entry: poetry run bandit -c pyproject.toml -r . |
| 28 | + language: system |
| 29 | + types: [ file, python ] |
| 30 | + - id: xenon |
| 31 | + name: xenon |
| 32 | + entry: bash -c "poetry run xenon -a $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['average'])\") -b $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['block'])\") -m $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['module'])\") . " |
| 33 | + language: system |
| 34 | + types: [ file, python ] |
| 35 | + - id: mypy |
| 36 | + name: mypy |
| 37 | + entry: poetry run mypy --no-namespace-packages --exclude esgf_playground_utils/models/__init__.py |
| 38 | + language: system |
| 39 | + types: [ file, python ] |
| 40 | + - id: bandit |
| 41 | + name: bandit |
| 42 | + entry: poetry run bandit -c pyproject.toml -r . |
| 43 | + language: system |
| 44 | + types: [ file, python ] |
| 45 | + - id: xenon |
| 46 | + name: xenon |
| 47 | + entry: bash -c "poetry run xenon -a $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['average'])\") -b $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['block'])\") -m $(poetry run python -c \"import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['module'])\") . " |
| 48 | + language: system |
| 49 | + types: [ file, python ] |
| 50 | + - id: mypy |
| 51 | + name: mypy |
| 52 | + entry: poetry run mypy --no-namespace-packages --exclude esgf_playground_utils/models/__init__.py |
| 53 | + language: system |
| 54 | + types: [ file, python ] |
0 commit comments