forked from reingart/pyfpdf
-
Notifications
You must be signed in to change notification settings - Fork 341
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (73 loc) · 2.03 KB
/
.pre-commit-config.yaml
File metadata and controls
73 lines (73 loc) · 2.03 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
exclude: ^(\.[^/]*cache(__)?/.*|(.*/)?\.coverage)$
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.6
hooks:
- id: remove-crlf
- id: remove-tabs
- id: chmod
args: ['644']
exclude: (^(contributors|docs|scripts|tutorial)/.*\.py|\.sh)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/psf/black
rev: 26.3.1
hooks:
- id: black
- repo: https://github.com/crate-ci/typos
rev: v1.45.0
hooks:
- id: typos
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.20.0'
hooks:
- id: mypy
args:
- --config-file=./pyproject.toml
files: ^fpdf/.*\.py$
additional_dependencies:
- cryptography
- defusedxml
- endesive
- fonttools
- numpy
- Pillow
- uharfbuzz
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.408
hooks:
- id: pyright
files: ^fpdf/.*\.py$
additional_dependencies:
- cryptography
- defusedxml
- endesive
- fonttools
- numpy
- Pillow
- uharfbuzz
- repo: local
hooks:
- id: no-print-in-sources
name: Ensure no print() statement appears in fpdf2 sources
language: pygrep
entry: print\(
files: ^fpdf/.*\.py$
exclude: fpdf/util.py
- id: no-generate-true
name: Ensure no generate=True is left in a call to assert_pdf_equal()
language: pygrep
entry: generate=True
files: ^test/.*\.py$
- id: pylint
name: pylint
# 3x faster than the official pylint hook, and has no issue with imports
# (tested with: time pre-commit run pylint --all-files)
language: system
entry: pylint
files: ^(fpdf/|test/|tutorial/tuto).*\.py$