Skip to content

Commit

Permalink
build/reactor: extract var proj_py_files in lint.sh 🛠️
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Oct 31, 2023
1 parent 9501398 commit 5ad6ea3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ set -euo pipefail
cd "$(dirname "$(readlink -f "$0")")/.."
source scripts/_utils.sh

log_and_run flake8 --count --statistics --show-source --max-complexity=10 --max-line-length=120 ./*.py tests
readonly proj_py_files=(./*.py tests)

log_and_run isort --line-length=120 --check-only --diff ./*.py tests
log_and_run flake8 --count --statistics --show-source --max-complexity=10 --max-line-length=120 "${proj_py_files[@]}"

log_and_run isort --line-length=120 --check-only --diff "${proj_py_files[@]}"

# https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
# https://mypy.readthedocs.io/en/stable/existing_code.html#ignoring-errors-from-certain-modules
log_and_run mypy ./*.py tests
log_and_run mypy "${proj_py_files[@]}"

# show --strict mypy info only without fail lint
log_and_run mypy --strict ./*.py tests || true
log_and_run mypy --strict "${proj_py_files[@]}" || true

0 comments on commit 5ad6ea3

Please sign in to comment.