Procházet zdrojové kódy

paver releaseok now depends on pyflakes with no warnings. contrib/release/flakesignore.txt lists the warnings to ignore

Ask Solem před 14 roky
rodič
revize
bb0f24dab7
2 změnil soubory, kde provedl 46 přidání a 2 odebrání
  1. 32 0
      contrib/release/flakesignore.txt
  2. 14 2
      pavement.py

+ 32 - 0
contrib/release/flakesignore.txt

@@ -0,0 +1,32 @@
+celery/app/__init__.py:(.+?) redefinition of function 'app_or_default'
+celery/backends/cache.py:(.+?) redefinition of unused 'memcache'
+celery/backends/cassandra.py:(.+?) redefinition of unused 'pycassa'
+celery/backends/mongodb.py:(.+?) redefinition of unused 'pymongo'
+celery/backends/pyredis.py:(.+?) redefinition of unused 'redis'
+celery/backends/pyredis.py:(.+?) redefinition of unused 'ConnectionError'
+celery/backends/tyrant.py:(.+?) redefinition of unused 'pytyrant'
+celery/concurrency/processes/pool.py:(.+?) redefinition of function 'poll'
+celery/db/a805d4bd.py:(.+?) redefinition of function 'process'
+celery/db/a805d4bd.py:(.+?) redefinition of function 'process'
+celery/db/models.py:(.+?) redefinition of unused 'PickleType'
+celery/loaders/default.py:(.+?) redefinition of unused 'AttributeDict'
+celery/platforms.py:(.+?) redefinition of unused '_setproctitle'
+celery/platforms.py:(.+?) redefinition of unused 'pwd'
+celery/platforms.py:(.+?) redefinition of unused 'grp'
+celery/serialization.py:(.+?) redefinition of unused 'cpickle'
+celery/serialization.py:(.+?) redefinition of function 'subclass_exception'
+celery/tests/test_backends/test_redis.py:(.+?) redefinition of unused 'ConnectionError'
+celery/tests/test_log.py:(.+?) redefinition of unused 'contextmanager'
+celery/tests/test_task_http.py:(.+?) redefinition of unused 'contextmanager'
+celery/tests/utils.py:(.+?) redefinition of unused 'contextmanager'
+celery/utils/__init__.py:(.+?) redefinition of unused 'ctypes'
+celery/utils/compat.py:(.+?) redefinition of unused 'parse_qsl'
+celery/utils/compat.py:(.+?) redefinition of unused 'MutableMapping'
+celery/utils/compat.py:(.+?) redefinition of unused 'defaultdict'
+celery/utils/compat.py:(.+?) redefinition of unused 'LoggerAdapter'
+celery/utils/compat.py:(.+?) redefinition of unused 'izip_longest'
+celery/utils/functional.py:(.+?) redefinition of unused 'partial'
+celery/utils/functional.py:(.+?) redefinition of unused 'update_wrapper'
+celery/utils/functional.py:(.+?) redefinition of unused 'wraps'
+celery/utils/mail.py:(.+?) redefinition of unused 'MIMEText'
+

+ 14 - 2
pavement.py

@@ -69,8 +69,20 @@ def verifyindex(options):
 
 
 @task
+@cmdopts([
+    ("noerror", "E", "Ignore errors"),
+])
 def flakes(options):
-    sh("find celery -name '*.py' | xargs pyflakes")
+    noerror = getattr(options, "noerror", False)
+    sh("""find celery -name '*.py' | xargs pyflakes | perl -mstrict -nle'
+           my $flake = $_;open(my $f, "contrib/release/flakesignore.txt");
+           my $ignored = 0;
+           PATTERN: foreach my $p (<$f>) { chomp($p);
+               if ($p && $flake =~ /$p/m) {
+                   $ignored = 1; last PATTERN; } } close($f);
+           if (! $ignored) { print $flake; our $FOUND_FLAKE = 1; }
+       }{exit $FOUND_FLAKE;
+            '""", ignore_error=noerror)
 
 
 @task
@@ -137,7 +149,7 @@ def gitcleanforce(options):
 
 
 @task
-@needs("pep8", "autodoc", "verifyindex", "test", "gitclean")
+@needs("pep8", "flakes", "autodoc", "verifyindex", "test", "gitclean")
 def releaseok(options):
     pass