-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcode-format.sh
More file actions
executable file
·27 lines (23 loc) · 665 Bytes
/
code-format.sh
File metadata and controls
executable file
·27 lines (23 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# chmod +x code-format.sh
# ./code-format.sh
function logging() {
echo -e "\033[0;32m$1\033[0m"
}
function whereIam() {
echo -e "@ \033[07m`pwd`\033[0m"
}
MODULE_DIRNAME="form_auto_fill_in"
HERE=$(cd $(dirname $0);pwd)
logging "cd $HERE"
cd $HERE
whereIam
# flake8
logging "poetry run flake8 ${MODULE_DIRNAME} --count --select=E9,F63,F7,F82 --show-source --statistics"
poetry run flake8 $MODULE_DIRNAME --count --select=E9,F63,F7,F82 --show-source --statistics
# isort
logging "poetry run isort ${MODULE_DIRNAME}"
poetry run isort $MODULE_DIRNAME
# black
logging "poetry run black ${MODULE_DIRNAME}"
poetry run black $MODULE_DIRNAME