From 5ad6ea36a68059707ce6fd4325b0209abb337a84 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Tue, 31 Oct 2023 19:24:06 +0800 Subject: [PATCH] =?UTF-8?q?build/reactor:=20extract=20var=20`proj=5Fpy=5Ff?= =?UTF-8?q?iles`=20in=20`lint.sh`=20=F0=9F=9B=A0=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/lint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index ef736f4..7d01dd5 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -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