forked from Azure/PyRIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
54 lines (49 loc) · 1.86 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
54
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
args: ["--maxkb=3072"] # Set limit to 3072 KB (3 MB) for displaying images in notebooks
- 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: ^.*\.(py|md)$
additional_dependencies: ['requests']
exclude: (release_process.md|git.md|^doc/deployment/|tests|pyrit/prompt_converter/morse_converter.py|.github|pyrit/prompt_converter/emoji_converter.py|pyrit/score/markdown_injection.py|pyrit/datasets/fetch_example_datasets.py)
- 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 ]