forked from Azure/PyRIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
53 lines (48 loc) · 1.6 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: NOTICE.txt
- id: end-of-file-fixer
exclude: NOTICE.txt
- id: check-yaml
- id: check-added-large-files
- id: detect-private-key
# https://black.readthedocs.io/en/stable/integrations/source_version_control.html
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: ['flake8-copyright']
exclude: (doc/|.github/|pyrit/prompt_converter/morse_converter.py|tests/converter/test_prompt_converter.py|pyrit/prompt_converter/emoji_converter.py)
- repo: local
hooks:
- id: check-links
name: Check Links in Python and md Files
entry: python ./.github/check_links.py
language: python
files: ^doc/.*\.(py|md)$
additional_dependencies: ['requests']
exclude: (release_process.md|git.md|^doc/deployment/)
- repo: https://github.com/pycqa/pylint
rev: v3.0.3
hooks:
- id: pylint
args: [--disable=all, --enable=unused-import]
exclude: NOTICE.txt
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
args: [--install-types, --non-interactive, --ignore-missing-imports]
name: mypy
entry: mypy
language: system
types: [ python ]