File tree Expand file tree Collapse file tree 4 files changed +85
-0
lines changed Expand file tree Collapse file tree 4 files changed +85
-0
lines changed Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/pre-commit/pre-commit-hooks
3
+ rev : v5.0.0
4
+ hooks :
5
+ - id : trailing-whitespace
6
+ - id : end-of-file-fixer
7
+ - id : check-json
8
+ - id : check-toml
9
+ - id : check-yaml
10
+ - id : check-added-large-files
11
+ - id : check-ast
12
+
13
+ - repo : https://github.com/psf/black
14
+ rev : 25.1.0
15
+ hooks :
16
+ - id : black
17
+
18
+ - repo : https://github.com/astral-sh/ruff-pre-commit
19
+ rev : v0.11.13
20
+ hooks :
21
+ - args :
22
+ - --fix
23
+ - --exit-non-zero-on-fix
24
+ id : ruff-check
25
+
26
+ - repo : https://gitlab.com/vojko.pribudic.foss/pre-commit-update
27
+ rev : v0.7.0
28
+ hooks :
29
+ - id : pre-commit-update
30
+
31
+ - repo : https://github.com/dhatim/python-license-check
32
+ rev : 0.9.3
33
+ hooks :
34
+ - id : liccheck
35
+ language : system
Original file line number Diff line number Diff line change @@ -15,3 +15,10 @@ To run a test with profiling:
15
15
```
16
16
pytest --profile-svg -k test_page_info
17
17
```
18
+
19
+ # How to use pre-commit
20
+
21
+ This project optionally uses [ pre-commit] ( https://pre-commit.com ) to check commits. To use it:
22
+
23
+ - Install pre-commit, e.g. ` pip install -r requirements-dev.txt `
24
+ - Install the repo-local git hooks: ` pre-commit install `
Original file line number Diff line number Diff line change @@ -44,3 +44,42 @@ optional-dependencies.dev = {file = ["requirements-dev.txt"]}
44
44
45
45
[tool .setuptools .packages .find ]
46
46
where = [" src" ]
47
+
48
+
49
+ [tool .ruff .lint ]
50
+ select = [" E" , " F" , " I" ]
51
+
52
+
53
+ [tool .liccheck ]
54
+ authorized_licenses = [
55
+ " bsd" ,
56
+ " new bsd" ,
57
+ " bsd license" ,
58
+ " new bsd license" ,
59
+ " simplified bsd" ,
60
+ " apache" ,
61
+ " apache 2.0" ,
62
+ " apache software license" ,
63
+ " apache software" ,
64
+ " apache license 2.0" ,
65
+ " gnu lgpl" ,
66
+ " lgpl with exceptions or zpl" ,
67
+ " GNU Library or Lesser General Public License (LGPL)" ,
68
+ " GNU Lesser General Public License v3 (LGPLv3)" ,
69
+ " GNU Lesser General Public License v2 or later (LGPLv2+)" ,
70
+ " mit" ,
71
+ " mit license" ,
72
+ " mit-cmu" ,
73
+ " python software foundation" ,
74
+ " psf" ,
75
+ " psf-2.0" ,
76
+ " Historical Permission Notice and Disclaimer (HPND)" ,
77
+ " public domain" ,
78
+ ' The Unlicense (Unlicense)' ,
79
+ " isc" ,
80
+ " ISC License (ISCL)" ,
81
+ ' Mozilla Public License 2.0 (MPL 2.0)' ,
82
+ ]
83
+ unauthorized_licenses = [
84
+ " gpl v3" ,
85
+ ]
Original file line number Diff line number Diff line change 7
7
types-lxml
8
8
types-tqdm
9
9
pandas-stubs
10
+
11
+ pre-commit
12
+ setuptools
13
+ liccheck
You can’t perform that action at this time.
0 commit comments