Browse Source

Switch from bash to sh for black wrapper.

end-to-end-database-tests
Dan Helfman 3 years ago
parent
commit
e323290e61
  1. 14
      scripts/black
  2. 4
      tox.ini

14
scripts/black

@ -1,13 +1,7 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -e
python_version=$(python --version)
if [[ "$python_version" =~ "Python 3.5." ]]; then
echo "Skipping black due to lack of support for $python_version."
elif [[ "$python_version" =~ "Python 3.4." ]]; then
echo "Skipping black due to lack of support for $python_version."
else
if which black; then
black --skip-string-normalization --line-length 100 --check .
else
echo "Skipping black due to not being installed."
fi

4
tox.ini

@ -5,11 +5,11 @@ skipsdist = True
[testenv]
usedevelop = True
deps = -rtest_requirements.txt
whitelist_externals = bash
whitelist_externals = sh
commands =
py.test --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end \
tests []
bash scripts/black
sh scripts/black
flake8 .
[testenv:black]

Loading…
Cancel
Save