File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ ci :
2+ autofix_prs : false
3+ autoupdate_schedule : ' quarterly'
4+ exclude : |
5+ (?x)^(
6+ extern|
7+ lib/matplotlib/mpl-data|
8+ doc/devel/gitwash|
9+ doc/users/prev|
10+ doc/api/prev|
11+ lib/matplotlib/tests/tinypages
12+ )
13+ repos :
14+ - repo : https://github.com/pre-commit/pre-commit-hooks
15+ rev : v4.0.1
16+ hooks :
17+ - id : check-added-large-files
18+ - id : check-docstring-first
19+ - id : end-of-file-fixer
20+ exclude_types : [svg]
21+ - id : mixed-line-ending
22+ - id : trailing-whitespace
23+ exclude_types : [svg]
24+ - repo : https://github.com/pycqa/flake8
25+ rev : 3.9.2
26+ hooks :
27+ - id : flake8
28+ additional_dependencies : [pydocstyle>5.1.0, flake8-docstrings>1.4.0]
29+ args : ["--docstring-convention=all"]
Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ true for ``*.py`` files. If you change the C-extension source (which might
6060also happen if you change branches) you will have to re-run
6161``python -m pip install -ve . ``
6262
63+ Installing pre-commit hooks
64+ ===========================
65+ You can optionally install `pre-commit <https://pre-commit.com/ >`_ hooks.
66+ These will automatically check flake8 and other style issues when you run
67+ ``git commit ``. The hooks are defined in the top level
68+ ``.pre-commit-config.yaml `` file. To install the hooks ::
69+
70+ pip install pre-commit
71+ pre-commit install
72+
6373Installing additional dependencies for development
6474==================================================
6575See :ref: `development-dependencies `.
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ dependencies:
4747 - nbformat!=5.0.0,!=5.0.1
4848 - pandas!=0.25.0
4949 - pikepdf
50+ - pre-commit
5051 - pydocstyle>=5.1.0
5152 - pytest!=4.6.0,!=5.4.0
5253 - pytest-cov
You can’t perform that action at this time.
0 commit comments