Fix scripts when there are only notebooks
This commit is contained in:
parent
9a024441b0
commit
8f4a320702
2 changed files with 12 additions and 4 deletions
|
|
@ -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 black . --exclude .env --check
|
||||
|
||||
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 .
|
||||
if ls *.py 1> /dev/null 2>&1; then
|
||||
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 .
|
||||
fi
|
||||
|
||||
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203
|
||||
|
||||
cd -
|
||||
|
||||
echo "Finished checking"
|
||||
|
|
|
|||
|
|
@ -18,10 +18,14 @@ python3 -m isort --profile black --skip .env .
|
|||
echo Running black
|
||||
python3 -m black . --exclude .env
|
||||
|
||||
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/ .
|
||||
if ls *.py 1> /dev/null 2>&1; then
|
||||
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/ .
|
||||
fi
|
||||
|
||||
echo Running Flake8
|
||||
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203
|
||||
|
||||
cd -
|
||||
|
||||
echo "Finished formatting"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue