We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5223b9a commit 9bcdf64Copy full SHA for 9bcdf64
1 file changed
autoformat.sh
@@ -0,0 +1,27 @@
1
+#!/bin/bash
2
+#
3
+# This script runs the auto-formatters (isort and pyink)
4
+# to fix code style and import order.
5
+
6
+set -e
7
8
+if ! command -v isort &> /dev/null
9
+then
10
+ echo "isort not found, refer to CONTRIBUTING.md to set up dev environment first."
11
+ exit
12
+fi
13
14
+if ! command -v pyink &> /dev/null
15
16
+ echo "pyink not found, refer to CONTRIBUTING.md to set up dev environment first."
17
18
19
20
21
+echo "Running isort to sort imports..."
22
+isort .
23
24
+echo "Running pyink to reformat code..."
25
+pyink .
26
27
+echo "Formatting complete."
0 commit comments