Browse Source

Switch from bash to sh for black wrapper.

tags/1.2.9
Dan Helfman 10 months ago
parent
commit
e323290e61
2 changed files with 6 additions and 12 deletions
  1. 4
    10
      scripts/black
  2. 2
    2
      tox.ini

+ 4
- 10
scripts/black View File

@@ -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

+ 2
- 2
tox.ini View File

@@ -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