|
1 |
| -default_language_version: |
2 |
| - python: python3 |
3 |
| - |
4 |
| -repos: |
5 |
| - - repo: https://github.com/psf/black |
6 |
| - rev: 23.1.0 |
7 |
| - hooks: |
8 |
| - - id: black |
9 |
| - args: ["-l 88"] |
10 |
| - files: zubhub_backend/.*\.py$ |
11 |
| - |
12 |
| - - repo: https://github.com/PyCQA/isort |
13 |
| - rev: 5.11.5 # do not update this until our CI runner uses Python >=3.8.1 |
14 |
| - hooks: |
15 |
| - - id: isort |
16 |
| - files: zubhub_backend/.*\.py$ |
17 |
| - |
18 |
| - - repo: https://github.com/PyCQA/flake8 |
19 |
| - rev: 5.0.4 # do not update this until our CI runner uses Python >=3.8.1 |
20 |
| - hooks: |
21 |
| - - id: flake8 |
22 |
| - # use same max-line-length as black |
23 |
| - # E121, E123, E126, E133, E226, E241, E242, E704 and W503 are default ignores |
24 |
| - # E124: closing bracket does not match visual indentation |
25 |
| - # E203: non-pep8 compliant brainfart of flake8 |
26 |
| - args: |
27 |
| - [ |
28 |
| - "--max-line-length=88", |
29 |
| - "--ignore=E121,E123,E126,E133,E203,E226,E241,E242,E704,W503,E124", |
30 |
| - ] |
31 |
| - files: zubhub_backend/.*\.py$ |
32 |
| - |
33 |
| - # - repo: https://github.com/pre-commit/mirrors-mypy |
34 |
| - # rev: v1.0.0 |
35 |
| - # hooks: |
36 |
| - # - id: mypy |
37 |
| - # exclude: ^tests/ |
38 |
| - # verbose: true |
39 |
| - # args: [--show-error-codes, --ignore-missing-imports] |
40 |
| - # additional_dependencies: |
41 |
| - # ["types-requests", "types-PyYAML", "types-flask", "toolforge-weld"] |
42 |
| - |
43 |
| - - repo: https://github.com/pre-commit/pre-commit-hooks |
44 |
| - rev: v4.4.0 |
45 |
| - hooks: |
46 |
| - - id: trailing-whitespace |
47 |
| - - id: end-of-file-fixer |
48 |
| - - id: check-yaml |
49 |
| - - id: check-shebang-scripts-are-executable |
50 |
| - - id: check-executables-have-shebangs |
51 |
| - - id: check-merge-conflict |
52 |
| - |
53 |
| - - repo: https://github.com/pre-commit/mirrors-eslint |
54 |
| - rev: v7.32.0 |
55 |
| - hooks: |
56 |
| - - id: eslint |
57 |
| - entry: ./zubhub_frontend/zubhub/pre-commit-eslint |
58 |
| - pass_filenames: false |
59 |
| - always_run: true |
60 |
| - |
61 |
| - - repo: https://github.com/pre-commit/mirrors-prettier |
62 |
| - rev: v3.1.0 |
63 |
| - hooks: |
64 |
| - - id: prettier |
65 |
| - files: zubhub_frontend/.*\.[jt]sx?$ |
66 |
| - exclude: ^zubhub_frontend/zubhub/node_modules/ |
67 |
| - args: ["--config", "./zubhub_frontend/zubhub/.prettierrc.yaml"] |
68 |
| - |
69 |
| - - repo: local |
70 |
| - hooks: |
71 |
| - - id: zubhub-test |
72 |
| - name: zubhub-test |
73 |
| - entry: ./zubhub_backend/pre-commit-zubhub-test |
74 |
| - language: system |
75 |
| - files: zubhub_backend/zubhub/.*\.py$ |
76 |
| - pass_filenames: false |
77 |
| - |
78 |
| - - id: media-test |
79 |
| - name: media-test |
80 |
| - entry: ./zubhub_backend/pre-commit-media-test |
81 |
| - language: system |
82 |
| - files: zubhub_backend/media/.*\.py$ |
83 |
| - pass_filenames: false |
84 |
| - |
85 |
| - - id: react-test |
86 |
| - name: react-test |
87 |
| - entry: npm --prefix ./zubhub_frontend/zubhub/ run test -- --coverage --watchAll=false |
88 |
| - language: node |
89 |
| - files: zubhub_frontend/.*\.[jt]sx?$ |
90 |
| - exclude: ^zubhub_frontend/zubhub/node_modules/ |
91 |
| - pass_filenames: false |
| 1 | +default_language_version: |
| 2 | + python: python3 |
| 3 | + |
| 4 | +repos: |
| 5 | + - repo: https://github.com/psf/black |
| 6 | + rev: 23.1.0 |
| 7 | + hooks: |
| 8 | + - id: black |
| 9 | + args: ["-l 88"] |
| 10 | + files: zubhub_backend/.*\.py$ |
| 11 | + |
| 12 | + - repo: https://github.com/PyCQA/isort |
| 13 | + rev: 5.11.5 # do not update this until our CI runner uses Python >=3.8.1 |
| 14 | + hooks: |
| 15 | + - id: isort |
| 16 | + files: zubhub_backend/.*\.py$ |
| 17 | + |
| 18 | + - repo: https://github.com/PyCQA/flake8 |
| 19 | + rev: 5.0.4 # do not update this until our CI runner uses Python >=3.8.1 |
| 20 | + hooks: |
| 21 | + - id: flake8 |
| 22 | + # use same max-line-length as black |
| 23 | + # E121, E123, E126, E133, E226, E241, E242, E704 and W503 are default ignores |
| 24 | + # E124: closing bracket does not match visual indentation |
| 25 | + # E203: non-pep8 compliant brainfart of flake8 |
| 26 | + args: |
| 27 | + [ |
| 28 | + "--max-line-length=88", |
| 29 | + "--ignore=E121,E123,E126,E133,E203,E226,E241,E242,E704,W503,E124", |
| 30 | + ] |
| 31 | + files: zubhub_backend/.*\.py$ |
| 32 | + |
| 33 | + # - repo: https://github.com/pre-commit/mirrors-mypy |
| 34 | + # rev: v1.0.0 |
| 35 | + # hooks: |
| 36 | + # - id: mypy |
| 37 | + # exclude: ^tests/ |
| 38 | + # verbose: true |
| 39 | + # args: [--show-error-codes, --ignore-missing-imports] |
| 40 | + # additional_dependencies: |
| 41 | + # ["types-requests", "types-PyYAML", "types-flask", "toolforge-weld"] |
| 42 | + |
| 43 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 44 | + rev: v4.4.0 |
| 45 | + hooks: |
| 46 | + - id: trailing-whitespace |
| 47 | + - id: end-of-file-fixer |
| 48 | + - id: check-yaml |
| 49 | + - id: check-shebang-scripts-are-executable |
| 50 | + - id: check-executables-have-shebangs |
| 51 | + - id: check-merge-conflict |
| 52 | + |
| 53 | + - repo: https://github.com/pre-commit/mirrors-eslint |
| 54 | + rev: v7.32.0 |
| 55 | + hooks: |
| 56 | + - id: eslint |
| 57 | + entry: ./zubhub_frontend/zubhub/pre-commit-eslint |
| 58 | + pass_filenames: false |
| 59 | + always_run: true |
| 60 | + |
| 61 | + - repo: https://github.com/pre-commit/mirrors-prettier |
| 62 | + rev: v3.1.0 |
| 63 | + hooks: |
| 64 | + - id: prettier |
| 65 | + files: zubhub_frontend/.*\.[jt]sx?$ |
| 66 | + exclude: ^zubhub_frontend/zubhub/node_modules/ |
| 67 | + args: ["--config", "./zubhub_frontend/zubhub/.prettierrc.yaml"] |
| 68 | + |
| 69 | + - repo: local |
| 70 | + hooks: |
| 71 | + - id: zubhub-test |
| 72 | + name: zubhub-test |
| 73 | + entry: ./zubhub_backend/pre-commit-zubhub-test |
| 74 | + language: system |
| 75 | + files: zubhub_backend/zubhub/.*\.py$ |
| 76 | + pass_filenames: false |
| 77 | + |
| 78 | + - id: media-test |
| 79 | + name: media-test |
| 80 | + entry: ./zubhub_backend/pre-commit-media-test |
| 81 | + language: system |
| 82 | + files: zubhub_backend/media/.*\.py$ |
| 83 | + pass_filenames: false |
| 84 | + |
| 85 | + - id: react-test |
| 86 | + name: react-test |
| 87 | + entry: npm --prefix ./zubhub_frontend/zubhub/ run test -- --coverage --watchAll=false |
| 88 | + language: node |
| 89 | + files: zubhub_frontend/.*\.[jt]sx?$ |
| 90 | + exclude: ^zubhub_frontend/zubhub/node_modules/ |
| 91 | + pass_filenames: false |
0 commit comments