summaryrefslogtreecommitdiff
path: root/bin/style-check
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2022-04-28 22:37:34 -0400
committerKaalleen <reni@allenka.de>2022-05-04 19:18:33 +0200
commitf24b329ef5994d09b1ecba996c439150e3af8195 (patch)
treead1d8f4df10849156f360462f692335464d2ebc8 /bin/style-check
parentca5178fb99ffe1af4331bb7d72b21e007fbb01f1 (diff)
pre-commit hook that only checks modifed files
Diffstat (limited to 'bin/style-check')
-rwxr-xr-xbin/style-check6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/style-check b/bin/style-check
new file mode 100755
index 00000000..ead4d553
--- /dev/null
+++ b/bin/style-check
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Checks Python coding style based on our project's preferences. Checks the
+# files passed on the command-line or everything if no files are passed.
+
+flake8 --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,electron,build,src,dist "${@:-.}"