From c820395dbfc05383a116a5d1ea922653dd32d6fe Mon Sep 17 00:00:00 2001 From: Asher Foa <1268088+asherf@users.noreply.github.com> Date: Sat, 26 Oct 2019 18:47:45 -0700 Subject: [PATCH] Run black linter and enforce going forward --- .travis.yml | 3 ++- Makefile | 6 +++++- README.md | 4 ++-- requirements-dev.txt | 1 + tox.ini | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c69c3ea1f..3e6eb3809 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,8 @@ install: python wait_for.py fi script: -- make test +- make test-only +- if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then make lint; fi after_success: - coveralls before_deploy: diff --git a/Makefile b/Makefile index 2a7249760..ca0286984 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,16 @@ init: lint: flake8 moto + black --check moto/ tests/ -test: lint +test-only: rm -f .coverage rm -rf cover @nosetests -sv --with-coverage --cover-html ./tests/ $(TEST_EXCLUDE) + +test: lint test-only + test_server: @TEST_SERVER_MODE=true nosetests -sv --with-coverage --cover-html ./tests/ diff --git a/README.md b/README.md index 7642009f3..4024328a9 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ [![Docs](https://readthedocs.org/projects/pip/badge/?version=stable)](http://docs.getmoto.org) ![PyPI](https://img.shields.io/pypi/v/moto.svg) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/moto.svg) -![PyPI - Downloads](https://img.shields.io/pypi/dw/moto.svg) +![PyPI - Downloads](https://img.shields.io/pypi/dw/moto.svg) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -# In a nutshell +## In a nutshell Moto is a library that allows your tests to easily mock out AWS Services. diff --git a/requirements-dev.txt b/requirements-dev.txt index c5fba292d..436a7a51b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ -r requirements.txt mock nose +black; python_version >= '3.6' sure==1.4.11 coverage flake8==3.7.8 diff --git a/tox.ini b/tox.ini index 1235a8e2b..9dacca18c 100644 --- a/tox.ini +++ b/tox.ini @@ -15,5 +15,5 @@ commands = nosetests {posargs} [flake8] -ignore = E128,E501,W504,W605 +ignore = W503,W605,E128,E501,E203,E266,E501,E231 exclude = moto/packages,dist