Skip to content

Commit ce09671

Browse files
committed
[util] Add a python lint script.
1 parent f822361 commit ce09671

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

utils/python-lint

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
4+
5+
python -c 'import flake8; import flake8_import_order' 2>/dev/null
6+
if [[ $? -ne 0 ]]; then
7+
echo "Missing modules flake8 or flake8-import-order. Please be sure to install these python packages before linting."
8+
exit 1
9+
fi
10+
11+
cd $SCRIPT_DIR/..
12+
flake8

0 commit comments

Comments
 (0)