Commits

Andriy Kornatskyy committed c703888

Introduced make target qa; fixed issues reported.

Comments (0)

Files changed (5)

-.SILENT: clean env doctest-cover test doc release upload
-.PHONY: clean env doctest-cover test doc release upload
+.SILENT: clean env doctest-cover qa test doc release upload
+.PHONY: clean env doctest-cover qa test doc release upload
 
 VERSION=2.7
 PYPI=http://pypi.python.org/simple
 		rotate --match=$(VERSION).egg --keep=1 --dist-dir=$(DIST_DIR) \
 		upload;
 
+qa:
+	if [ "$$(echo $(VERSION) | sed 's/\.//')" -eq 27 ]; then \
+		flake8 --max-complexity 10 doc src setup.py && \
+		pep8 doc src setup.py ; \
+	fi
+
 test:
 	memcached -s /tmp/memcached.sock -d
 	$(PYTEST) -q -x --pep8 --doctest-modules \
 try:
     from setuptools import setup
 except:
-    from distutils.core import setup
+    from distutils.core import setup  # noqa
 
 README = open(os.path.join(os.path.dirname(__file__), 'README')).read()
 

src/wheezy/caching/__init__.py

 """ ``caching`` package.
 """
 
+# flake8: noqa
+
 from wheezy.caching.client import CacheClient
 from wheezy.caching.dependency import CacheDependency
 from wheezy.caching.memory import MemoryCache

src/wheezy/caching/comp.py

 if PY3:  # pragma: nocover
     from _thread import allocate_lock
 else:  # pragma: nocover
-    from thread import allocate_lock
+    from thread import allocate_lock  # noqa
 
 if PY2 and PY_MINOR == 4:  # pragma: nocover
     __import__ = __import__
 if PY3:  # pragma: nocover
     from queue import Queue
 else:  # pragma: nocover
-    from Queue import Queue
+    from Queue import Queue  # noqa

src/wheezy/caching/memory.py

 
 """ ``memory`` module.
 """
-from operator import itemgetter
+
 from time import time as unixtime
 
 from wheezy.caching.comp import allocate_lock