Skip to content

Commit

Permalink
add black.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed Jan 18, 2019
1 parent 7b96597 commit f55d1ee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.creole
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ django-reversion-compare$ source .virtualenv/bin/activate
(.virtualenv) django-reversion-compare$ tox
}}}

**Note:** Just call {{{./create_env.sh}}} again to update a existing virtualenv ;)
**Note:**

* Just call {{{./create_env.sh}}} again to update a existing virtualenv ;)
* Please run {{{./black.sh}}} to reformat the code **before** creating a pull requests
== running tests

Expand Down
15 changes: 15 additions & 0 deletions black.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

VIRTUALENV=.virtualenv

if [[ ! -d ${VIRTUALENV} ]]; then
echo -e "ERROR: Virtualenv not found here: '${VIRTUALENV}'"
exit -1
fi

source ${VIRTUALENV}/bin/activate
set -ex

# https://github.com/ambv/black#command-line-options
${VIRTUALENV}/bin/black --line-length=119 --safe ./reversion_compare/
${VIRTUALENV}/bin/black --line-length=119 --safe ./reversion_compare_tests/

0 comments on commit f55d1ee

Please sign in to comment.