summaryrefslogtreecommitdiff
path: root/pavement.py
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2011-04-21 18:29:51 +0200
committerAsk Solem <ask@celeryproject.org>2011-04-21 18:29:51 +0200
commit1606cd96a00eb23cf4b1fd6c3b5cf7da0836abe3 (patch)
tree1bed9496b20b0cc8bd624c52d3177fe5c66fe5a0 /pavement.py
parent976af54e9ec1d6f5715b38acd5440756e2944979 (diff)
downloadkombu-1606cd96a00eb23cf4b1fd6c3b5cf7da0836abe3.tar.gz
Use flake8 instead of pep8+pyflakes, and add it as a step in releaseok()v1.1.3
Diffstat (limited to 'pavement.py')
-rw-r--r--pavement.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/pavement.py b/pavement.py
index d658e631..e00dda79 100644
--- a/pavement.py
+++ b/pavement.py
@@ -1,6 +1,6 @@
-from paver.easy import *
-from paver import doctools
-from paver.setuputils import setup
+from paver.easy import * # noqa
+from paver import doctools # noqa
+from paver.setuputils import setup # noqa
options(
sphinx=Bunch(builddir=".build"),
@@ -113,6 +113,20 @@ def test(options):
@cmdopts([
("noerror", "E", "Ignore errors"),
])
+def flake8(options):
+ noerror = getattr(options, "noerror", False)
+ complexity = getattr(options, "complexity", 22)
+ sh("""flake8 . | perl -mstrict -mwarnings -nle'
+ my $ignore = m/too complex \((\d+)\)/ && $1 le %s;
+ if (! $ignore) { print STDERR; our $FOUND_FLAKE = 1 }
+ }{exit $FOUND_FLAKE;
+ '""" % (complexity, ), ignore_error=noerror)
+
+
+@task
+@cmdopts([
+ ("noerror", "E", "Ignore errors"),
+])
def pep8(options):
noerror = getattr(options, "noerror", False)
return sh("""find kombu -name "*.py" | xargs pep8 | perl -nle'\
@@ -137,7 +151,7 @@ def gitcleanforce(options):
@task
-@needs("pep8", "autodoc", "verifyindex", "test", "gitclean")
+@needs("flake8", "autodoc", "verifyindex", "test", "gitclean")
def releaseok(options):
pass