summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-10-02 09:46:29 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-10-02 09:46:29 +0200
commitc6581e9871a356b73ccc640b1aeabd06f2590758 (patch)
tree4d24aac4c3564b4f78915f0634da7460ab68593b
parentadd5f7b8eba427de9d39caae864bbc6dc37ef980 (diff)
downloadastroid-git-c6581e9871a356b73ccc640b1aeabd06f2590758.tar.gz
Add black step in tox.ini and Travis, as well as the badge
-rw-r--r--.travis.yml2
-rw-r--r--README.rst3
-rw-r--r--tox.ini6
3 files changed, 11 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 0ed569a7..6e3f1044 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,8 @@ matrix:
env: TOXENV=py37
dist: xenial
sudo: true
+ - python: 3.6
+ env: TOXENV=formatting
before_install:
- python --version
diff --git a/README.rst b/README.rst
index b12356ea..de20fa9f 100644
--- a/README.rst
+++ b/README.rst
@@ -15,6 +15,9 @@ Astroid
:target: http://astroid.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
+
What's this?
diff --git a/tox.ini b/tox.ini
index 3e78f504..14881de1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -38,6 +38,12 @@ commands =
; inside the package
python -Wi {envsitepackagesdir}/coverage run -m pytest --pyarg astroid/tests {posargs:}
+[testenv:formatting]
+basepython = python3
+deps = black==18.6b4
+commands = black --check --exclude "tests/testdata" astroid
+changedir = {toxinidir}
+
[testenv:coveralls]
setenv =
COVERAGE_FILE = {toxinidir}/.coverage