Commits

Andriy Kornatskyy committed 0504566

Introduced make target qa; fixed issues reported.

  • Participants
  • Parent commits 73a4afa

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:
 	$(PYTEST) -q -x --pep8 --doctest-modules \
 		src/wheezy/security
 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/security/__init__.py

 """ ``security`` package.
 """
 
+# flake8: noqa
+
 from wheezy.security.authorization import authorized
 from wheezy.security.errors import SecurityError
 from wheezy.security.principal import Principal

src/wheezy/security/crypto/__init__.py

 """ ``crypto`` package.
 """
 
+# flake8: noqa
+
 from wheezy.security.crypto.ticket import Ticket

src/wheezy/security/crypto/comp.py

     chr = chr
     ord = ord
 
-    def n(s, encoding='latin1'):
+    def n(s, encoding='latin1'):  # noqa
         if isinstance(s, bytes_type):
             return s
         return s.encode(encoding)
 
-    def btos(b, encoding):
+    def btos(b, encoding):  # noqa
         return b.decode(encoding)
 
     u = lambda s: unicode(s, 'unicode_escape')
         ripemd160 = None
         whirlpool = None
 except ImportError:  # pragma: nocover
-    import md5
-    import sha as sha1
-    sha224 = sha256 = sha384 = sha512 = ripemd160 = whirlpool = None
+    import md5  # noqa
+    import sha as sha1  # noqa
+    sha224 = sha256 = sha384 = sha512 = ripemd160 = whirlpool = None  # noqa
     digest_size = lambda d: d.digest_size
 
 # Encryption interface