summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-05-16 10:55:51 +0300
committerLars Wirzenius <liw@liw.fi>2020-05-16 10:55:51 +0300
commit8fce71dd046de0965295e9843b589b124ae7c617 (patch)
treebd96797666ee262768b569b8c4c4163e126f6ff8 /check
parent68202e1844d4b8fe8394d2d9dcebf204f93c8f3a (diff)
downloadsubplot-8fce71dd046de0965295e9843b589b124ae7c617.tar.gz
test: check that all Python code is formatted with black
Skip the Python code template, and test.py which the test suite creates. The template isn't Python, and test.py is generated from the template, so both are pointless to check with black.
Diffstat (limited to 'check')
-rwxr-xr-xcheck6
1 files changed, 6 insertions, 0 deletions
diff --git a/check b/check
index 073b6ee..06ff696 100755
--- a/check
+++ b/check
@@ -46,6 +46,12 @@ then
find src -type f -name '*.rs' -exec rustfmt --check '{}' +
fi
+if command -v black > /dev/null
+then
+ $hideok find . -type f -name '*.py' ! -name template.py ! -name test.py \
+ -exec black --check '{}' +
+fi
+
for md in [^R]*.md
do
$hideok echo "$md ====================================="