|
1 | | -# Copyright 2022 VMware, Inc. |
2 | | -# SPDX-License-Identifier: Apache-2 |
3 | | - |
4 | 1 | default_language_version: |
5 | | - python: python3 |
6 | | - |
| 2 | + python: python3 |
7 | 3 | repos: |
8 | | - # ----- Local Hooks -----------------------------------------------------------------------------------------------> |
9 | | - - repo: local |
10 | | - hooks: |
11 | | - - id: check-changelog-entries |
12 | | - name: Check Changelog Entries |
13 | | - entry: python .pre-commit-hooks/check_changelog_entries.py |
14 | | - language: system |
15 | | - |
16 | | - - repo: local |
17 | | - hooks: |
18 | | - - id: check-copyright-headers |
19 | | - name: Check python modules for appropriate copyright headers |
20 | | - files: ^.*\.py$ |
21 | | - exclude: setup\.py |
22 | | - entry: python .pre-commit-hooks/copyright_headers.py |
23 | | - language: system |
24 | | - # <---- Local Hooks ------------------------------------------------------------------------------------------------ |
25 | | - |
26 | | - - repo: https://github.com/timothycrosley/isort |
27 | | - rev: 5.12.0 |
28 | | - hooks: |
29 | | - - id: isort |
30 | | - |
31 | | - - repo: https://github.com/psf/black |
32 | | - rev: 22.6.0 |
33 | | - hooks: |
34 | | - - id: black |
35 | | - |
36 | | - # ----- Code Analysis ---------------------------------------------------------------------------------------------> |
37 | | - - repo: https://github.com/pycqa/flake8 |
38 | | - rev: '5.0.4' |
39 | | - hooks: |
40 | | - - id: flake8 |
41 | | - exclude: ^(\.pre-commit-hooks/.*\.py)$ |
42 | | - additional_dependencies: |
43 | | - - flake8-mypy-fork |
44 | | - - flake8-docstrings |
45 | | - - flake8-typing-imports |
46 | | - # <---- Code Analysis --------------------------------------------------------------------------------------------- |
| 4 | +- repo: local |
| 5 | + hooks: |
| 6 | + - id: check-changelog-entries |
| 7 | + name: Check Changelog Entries |
| 8 | + entry: python .pre-commit-hooks/check_changelog_entries.py |
| 9 | + language: system |
| 10 | +- repo: local |
| 11 | + hooks: |
| 12 | + - id: check-copyright-headers |
| 13 | + name: Check python modules for appropriate copyright headers |
| 14 | + files: ^.*\.py$ |
| 15 | + exclude: setup\.py |
| 16 | + entry: python .pre-commit-hooks/copyright_headers.py |
| 17 | + language: system |
| 18 | +- repo: https://github.com/timothycrosley/isort |
| 19 | + rev: 5.12.0 |
| 20 | + hooks: |
| 21 | + - id: isort |
| 22 | +- repo: https://github.com/psf/black |
| 23 | + rev: 22.6.0 |
| 24 | + hooks: |
| 25 | + - id: black |
| 26 | +- repo: https://github.com/pycqa/flake8 |
| 27 | + rev: 5.0.4 |
| 28 | + hooks: |
| 29 | + - id: flake8 |
| 30 | + exclude: ^(\.pre-commit-hooks/.*\.py)$ |
| 31 | + additional_dependencies: |
| 32 | + - flake8-mypy-fork |
| 33 | + - flake8-docstrings |
| 34 | + - flake8-typing-imports |
| 35 | +- repo: https://github.com/pre-commit/mirrors-mypy |
| 36 | + rev: v1.11.1 |
| 37 | + hooks: |
| 38 | + - id: mypy |
| 39 | + args: |
| 40 | + - --strict |
| 41 | + - --config-file=pyproject.toml |
| 42 | + - relenv/ |
| 43 | + - tests/ |
| 44 | + additional_dependencies: |
| 45 | + - types-requests |
| 46 | + pass_filenames: false |
0 commit comments