Fix scripts when there are only notebooks

This commit is contained in:
Andras Schmelczer 2022-06-19 17:03:40 +02:00
parent 9a024441b0
commit 8f4a320702
2 changed files with 12 additions and 4 deletions

View file

@ -13,9 +13,13 @@ python3 -m autoflake --expand-star-imports --remove-all-unused-imports --ignore-
python3 -m isort --profile black --skip .env . --check python3 -m isort --profile black --skip .env . --check
python3 -m black . --exclude .env --check python3 -m black . --exclude .env --check
if ls *.py 1> /dev/null 2>&1; then
yes | python3 -m mypy . --install-types > /dev/null || true yes | python3 -m mypy . --install-types > /dev/null || true
python3 -m mypy --namespace-packages --ignore-missing-imports --install-types --non-interactive --disallow-untyped-defs --disallow-incomplete-defs --follow-imports=silent --exclude=external/ --exclude=/build/ --pretty . python3 -m mypy --namespace-packages --ignore-missing-imports --install-types --non-interactive --disallow-untyped-defs --disallow-incomplete-defs --follow-imports=silent --exclude=external/ --exclude=/build/ --pretty .
fi
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203 python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203
cd - cd -
echo "Finished checking"

View file

@ -18,10 +18,14 @@ python3 -m isort --profile black --skip .env .
echo Running black echo Running black
python3 -m black . --exclude .env python3 -m black . --exclude .env
if ls *.py 1> /dev/null 2>&1; then
echo Running mypy echo Running mypy
python3 -m mypy --namespace-packages --ignore-missing-imports --install-types --non-interactive --disallow-untyped-defs --disallow-incomplete-defs --pretty --follow-imports=silent --exclude=external/ --exclude=/build/ . python3 -m mypy --namespace-packages --ignore-missing-imports --install-types --non-interactive --disallow-untyped-defs --disallow-incomplete-defs --pretty --follow-imports=silent --exclude=external/ --exclude=/build/ .
fi
echo Running Flake8 echo Running Flake8
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203 python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203
cd - cd -
echo "Finished formatting"