summaryrefslogtreecommitdiffstats
path: root/run_checks.sh
blob: b13a61c8ac0b3d4a972cd594bb34ee86f015062f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e

[[ -z "${GITHUB_ACTIONS}" ]] && RETURN_ERROR_CODE='' || RETURN_ERROR_CODE='--check'

python -m autoflake -i -r ${RETURN_ERROR_CODE} \
  --expand-star-imports \
  --remove-all-unused-imports \
  --ignore-init-module-imports \
  --remove-duplicate-keys \
  --remove-unused-variables \
  sqlglot/ tests/
python -m isort --profile black sqlglot/ tests/
python -m black ${RETURN_ERROR_CODE} --line-length 120 sqlglot/ tests/
python -m mypy sqlglot tests
python -m unittest