File tree Expand file tree Collapse file tree 4 files changed +14
-24
lines changed Expand file tree Collapse file tree 4 files changed +14
-24
lines changed Original file line number Diff line number Diff line change 11exclude : ' ^(mypyc/external/)|(mypy/typeshed/)|misc/typeshed_patches' # Exclude all vendored code from lints
22repos :
33 - repo : https://github.com/pre-commit/pre-commit-hooks
4- rev : v4.5.0 # must match test-requirements.txt
4+ rev : v4.5.0
55 hooks :
66 - id : trailing-whitespace
77 - id : end-of-file-fixer
88 - repo : https://github.com/psf/black-pre-commit-mirror
9- rev : 24.8.0 # must match test-requirements.txt
9+ rev : 24.8.0
1010 hooks :
1111 - id : black
1212 exclude : ' ^(test-data/)'
1313 - repo : https://github.com/astral-sh/ruff-pre-commit
14- rev : v0.6.9 # must match test-requirements.txt
14+ rev : v0.6.9
1515 hooks :
1616 - id : ruff
1717 args : [--exit-non-zero-on-fix]
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ First install any additional dependencies needed for testing:
100100
101101 python3 -m pip install -U -r test-requirements.txt
102102
103+ Configure ` pre-commit ` to run the linters automatically when you commit:
104+
105+ pre-commit install
106+
103107The unit test suites are driven by the ` pytest ` framework. To run all mypy tests,
104108run ` pytest ` in the mypy repository:
105109
@@ -157,9 +161,11 @@ To run mypy on itself:
157161
158162 python3 -m mypy --config-file mypy_self_check.ini -p mypy
159163
160- To run the linter:
164+ To run the linter (this commands just wraps ` pre-commit ` , so you can also
165+ invoke it directly like ` pre-commit run -a ` , and this will also run when you
166+ ` git commit ` if enabled):
161167
162- ruff .
168+ python3 runtests.py lint
163169
164170You can also run all of the above tests using ` runtests.py ` (this includes
165171type checking mypy and linting):
Original file line number Diff line number Diff line change 44-r mypy-requirements.txt
55-r build-requirements.txt
66attrs>=18.0
7- black==24.8.0 # must match version in .pre-commit-config.yaml
87filelock>=3.3.0
98# lxml 4.9.3 switched to manylinux_2_28, the wheel builder still uses manylinux2014
109lxml>=4.9.1,<4.9.3; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12'
1110psutil>=4.0
1211pytest>=8.1.0
1312pytest-xdist>=1.34.0
1413pytest-cov>=2.10.0
15- ruff==0.6.9 # must match version in .pre-commit-config.yaml
1614setuptools>=75.1.0
1715tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.8
1816pre_commit>=3.5.0
Original file line number Diff line number Diff line change 66#
77attrs==24.2.0
88 # via -r test-requirements.in
9- black==24.8.0
10- # via -r test-requirements.in
119cfgv==3.4.0
1210 # via pre-commit
13- click==8.1.7
14- # via black
1511coverage==7.6.1
1612 # via pytest-cov
1713distlib==0.3.9
@@ -29,21 +25,13 @@ iniconfig==2.0.0
2925lxml==4.9.2 ; (python_version < "3.11" or sys_platform != "win32") and python_version < "3.12"
3026 # via -r test-requirements.in
3127mypy-extensions==1.0.0
32- # via
33- # -r mypy-requirements.txt
34- # black
28+ # via -r mypy-requirements.txt
3529nodeenv==1.9.1
3630 # via pre-commit
3731packaging==24.1
38- # via
39- # black
40- # pytest
41- pathspec==0.12.1
42- # via black
32+ # via pytest
4333platformdirs==4.3.6
44- # via
45- # black
46- # virtualenv
34+ # via virtualenv
4735pluggy==1.5.0
4836 # via pytest
4937pre-commit==3.5.0
@@ -61,8 +49,6 @@ pytest-xdist==3.6.1
6149 # via -r test-requirements.in
6250pyyaml==6.0.2
6351 # via pre-commit
64- ruff==0.6.9
65- # via -r test-requirements.in
6652tomli==2.0.2
6753 # via -r test-requirements.in
6854types-psutil==6.0.0.20241011
You can’t perform that action at this time.
0 commit comments