Skip to content

Commit 9a2af78

Browse files
committed
Add script/format for black formatting
1 parent adb5d8f commit 9a2af78

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

script/format

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# script/format: Format python code
4+
5+
set -e
6+
cd "$(dirname "$0")/.."
7+
8+
FILES_TO_FORMAT="src/ tests/ setup.py"
9+
10+
if [ "$1" = "--check" ]; then
11+
python -m black --check ${FILES_TO_FORMAT}
12+
else
13+
python -m black ${FILES_TO_FORMAT}
14+
fi

0 commit comments

Comments
 (0)