File tree Expand file tree Collapse file tree 3 files changed +16
-22
lines changed Expand file tree Collapse file tree 3 files changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ repos:
11
11
stages : [commit]
12
12
types : [python]
13
13
14
+ - id : doc8
15
+ name : doc8
16
+ entry : doc8
17
+ language : system
18
+ files : \.rst$
19
+ require_serial : true
20
+
14
21
- id : flake8
15
22
name : flake8
16
23
entry : flake8
Original file line number Diff line number Diff line change @@ -45,26 +45,20 @@ More details on using ``unittest`` are `here
45
45
Code quality checks
46
46
^^^^^^^^^^^^^^^^^^^
47
47
48
- PySTAC uses `flake8 <http://flake8.pycqa.org/en/latest/ >`_ and `black
49
- <https://github.com/psf/black> `_ for code formatting and style checks.
48
+ PySTAC uses
50
49
51
- To run both:
50
+ - `black <https://github.com/psf/black >`_ for Python code formatting
51
+ - `doc8 <https://github.com/pycqa/doc8 >`__ for style checking on RST files in the docs
52
+ - `flake8 <http://flake8.pycqa.org/en/latest/ >`_ for Python style checks
53
+ - `mypy <http://www.mypy-lang.org/ >`_ for Python type annotation checks
52
54
53
- .. code-block :: bash
54
-
55
- > pre-commit run --all-files
56
-
57
- We also use `doc8 <https://github.com/pycqa/doc8 >`__ for style checking on RST files in
58
- the docs.
59
-
60
- To check doc formatting:
55
+ To run all of these:
61
56
62
57
.. code-block :: bash
63
58
64
- > doc8 docs
59
+ > pre-commit run --all-files
65
60
66
- You can also run the ``./scripts/test `` script to run unit tests, check code style with
67
- ``flake8 `` and ``black ``, and check type annotations using ``mypy ``.
61
+ You can also run the ``./scripts/test `` script to run all of the above and unit tests.
68
62
69
63
CHANGELOG
70
64
^^^^^^^^^
Original file line number Diff line number Diff line change 3
3
set -e
4
4
5
5
echo
6
- echo " -- CHECKING WITH BLACK, FLAKE8 AND MYPY --"
6
+ echo " -- CHECKING WITH BLACK, DOC8, FLAKE8 AND MYPY --"
7
7
echo
8
8
9
9
pre-commit run --all-files
12
12
echo " -- CHECKING SPELLING WITH CODESPELL --"
13
13
echo
14
14
15
- echo
16
- echo " -- LINTING RST FILES WITH DOC8 --"
17
- echo
18
-
19
- doc8 docs -q
20
-
21
-
22
15
# Code spelling
23
16
codespell -I .codespellignore -f \
24
17
pystac/* .py pystac/** /* .py \
You can’t perform that action at this time.
0 commit comments