From 0bf3fa458deffe1306f226a7257ceda927ca9e8e Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 29 May 2018 14:35:32 -0700 Subject: Modernize travis/dev-reqs/etc re: blackening --- .travis.yml | 5 ++++- dev-requirements.txt | 4 ++-- setup.cfg | 2 +- tasks.py | 13 ++++++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4316bd9f..16d33b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,10 @@ install: - pip install codecov # For codecov specifically - pip install -r dev-requirements.txt script: - # flake8 is now possible! + # Fast syntax check failures for more rapid feedback to submitters + # (Travis-oriented metatask that version checks Python, installs, runs.) + - inv travis.blacken + # I have this in my git pre-push hook, but contributors probably don't - flake8 # All (including slow) tests, w/ coverage! - inv coverage diff --git a/dev-requirements.txt b/dev-requirements.txt index d41972b9..e4629187 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ # Invocations for common project tasks -invoke>=0.13,<2.0 -invocations>=1.0,<2.0 +invoke>=1.0,<2.0 +invocations>=1.2.0,<2.0 # NOTE: pytest-relaxed currently only works with pytest >=3, <3.3 pytest>=3.2,<3.3 pytest-relaxed==1.1.2 diff --git a/setup.cfg b/setup.cfg index a24844d0..2d673ea4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,7 +9,7 @@ omit = paramiko/_winapi.py [flake8] exclude = sites,.git,build,dist,demos,tests -ignore = E124,E125,E128,E261,E301,E302,E303,E402,E721 +ignore = E124,E125,E128,E261,E301,E302,E303,E402,E721,W503 max-line-length = 79 [tool:pytest] diff --git a/tasks.py b/tasks.py index 6cf20377..d4cd414b 100644 --- a/tasks.py +++ b/tasks.py @@ -3,6 +3,8 @@ from os.path import join from shutil import rmtree, copytree from invoke import Collection, task +from invocations import travis +from invocations.checks import blacken from invocations.docs import docs, www, sites from invocations.packaging.release import ns as release_coll, publish from invocations.testing import count_errors @@ -121,7 +123,16 @@ def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False, index=None): release_coll.tasks["publish"] = release ns = Collection( - test, coverage, guard, release_coll, docs, www, sites, count_errors + test, + coverage, + guard, + release_coll, + docs, + www, + sites, + count_errors, + travis, + blacken, ) ns.configure( { -- cgit v1.2.3