Skip to content

Commit 501e98e

Browse files
committed
Move to black as formatter
1 parent d0c6cc5 commit 501e98e

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mypy==0.790
22
flake8==3.8.*
3-
yapf==0.30.*
3+
black==21.4b2
44

55
codespell==1.17.1
66
ipython==7.16.1

scripts/format

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
1717
if [ "${1:-}" = "--help" ]; then
1818
usage
1919
else
20-
yapf -ipr pystac tests
20+
black pystac
21+
black tests
2122
fi
2223
fi

scripts/test

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,28 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
1717
if [ "${1:-}" = "--help" ]; then
1818
usage
1919
else
20-
# Types
20+
echo
21+
echo " -- CHECKING TYPES WITH PYRIGHT --"
22+
echo
23+
2124
scripts/pyright pystac tests
2225

23-
# Lint
26+
echo
27+
echo " -- LINTING WITH FLAKE8 --"
28+
echo
29+
2430
flake8 pystac tests
2531

26-
# Code formatting
27-
yapf -dpr pystac tests
32+
echo
33+
echo " -- CHECKING FORMAT WITH BLACK --"
34+
echo
35+
36+
black --check pystac
37+
black --check tests
38+
39+
echo
40+
echo " -- CHECKING SPELLING WITH CODESPELL --"
41+
echo
2842

2943
# Code spelling
3044
codespell -I .codespellignore -f \
@@ -36,6 +50,10 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
3650
*.py \
3751
*.md
3852

53+
echo
54+
echo " -- RUNNING UNIT TESTS --"
55+
echo
56+
3957
# Test suite with coverage enabled
4058
coverage run --source=pystac/ -m unittest discover tests/
4159
coverage xml

0 commit comments

Comments
 (0)