You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

format.sh 411 B

1234567891011121314151617181920
  1. #!/usr/bin/env bash
  2. set -e
  3. cd $(dirname $0)/..
  4. ISORT_ARG=""
  5. BLACK_ARG=""
  6. while getopts 'd' OPT; do
  7. case $OPT in
  8. d)
  9. ISORT_ARG="--diff --check-only"
  10. BLACK_ARG="--diff --check"
  11. ;;
  12. ?)
  13. echo "Usage: `basename $0` [-d]"
  14. esac
  15. done
  16. isort $ISORT_ARG -j $(nproc) -rc megenginelite test
  17. black $BLACK_ARG --target-version=py35 -- megenginelite test