Commits

Andriy Kornatskyy  committed 2af8419

Introduced make target qa; fixed issues reported.

  • Participants
  • Parent commits f894bb3

Comments (0)

Files changed (7)

-.SILENT: clean env po doctest-cover test doc release upload
-.PHONY: clean env po doctest-cover test doc release upload
+.SILENT: clean env po doctest-cover qa test doc release upload
+.PHONY: clean env po 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/html
 # wheezy.html documentation build configuration file, created by
 # sphinx-quickstart on Fri Sep  9 20:36:50 2011.
 #
-# This file is execfile()d with the current directory set to its containing dir.
+# This file is execfile()d with the current directory set to its containing
+# dir.
 #
 # Note that not all possible configuration values are present in this
 # autogenerated file.
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys, os
+import os
+import sys
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 #sys.path.insert(0, os.path.abspath('.'))
 sys.path.extend([
-	os.path.abspath(os.path.join('..', 'src'))
+    os.path.abspath(os.path.join('..', 'src'))
 ])
 
-# -- General configuration -----------------------------------------------------
+# -- General configuration ---------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
 #needs_sphinx = '1.0'
 
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = [
     'sphinx.ext.autodoc', 'sphinx.ext.doctest',
     'sphinx.ext.coverage', 'sphinx.ext.viewcode'
 # directories to ignore when looking for source files.
 exclude_patterns = ['_build']
 
-# The reST default role (used for this markup: `text`) to use for all documents.
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
 #default_role = None
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 #modindex_common_prefix = []
 
 
-# -- Options for HTML output ---------------------------------------------------
+# -- Options for HTML output -------------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
     'codetextcolor': '#060',
     'bodyfont': 'Georgia, serif',
     'headfont': 'Calibri, sans-serif',
-	'stickysidebar': True,
-	'externalrefs': True
+    'stickysidebar': True,
+    'externalrefs': True
 }
 
 # Add any paths that contain custom themes here, relative to this directory.
 htmlhelp_basename = 'wheezy.htmldoc'
 
 
-# -- Options for LaTeX output --------------------------------------------------
+# -- Options for LaTeX output ------------------------------------------------
 
 # The paper size ('letter' or 'a4').
 #latex_paper_size = 'letter'
 #latex_font_size = '10pt'
 
 # Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
+# (source start file, target name, title, author, documentclass
+# [howto/manual]).
 latex_documents = [
-  ('index', 'wheezy.html.tex', u'wheezy.html Documentation',
-   u'Andriy Kornatskyy', 'manual'),
+    ('index', 'wheezy.html.tex', u'wheezy.html Documentation',
+     u'Andriy Kornatskyy', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
 #latex_domain_indices = True
 
 
-# -- Options for manual page output --------------------------------------------
+# -- Options for manual page output ------------------------------------------
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 import sys
 
 extra = {}
-can_build_ext = getattr(platform, 'python_implementation', lambda: None
-                   )() != 'PyPy' and 'java' not in sys.platform
+can_build_ext = getattr(
+    platform, 'python_implementation',
+    lambda: None
+)() != 'PyPy' and 'java' not in sys.platform
 sources = [os.path.join('src', 'wheezy', 'html', 'boost.c')]
 
 try:
     from setuptools import setup, Extension, Feature
     from setuptools.command.build_ext import build_ext
 except ImportError:
-    from distutils.core import setup, Extension
-    from distutils.command.build_ext import build_ext
+    from distutils.core import setup, Extension  # noqa
+    from distutils.command.build_ext import build_ext  # noqa
     if can_build_ext:
         extra['ext_modules'] = [Extension('wheezy.html.boost', sources)]
 else:

File src/wheezy/html/ext/tests/test_jinja2.py

 
 except ImportError:  # pragma: nocover
 
-    def assert_jinja2_equal(text, expected, **kwargs):
+    def assert_jinja2_equal(text, expected, **kwargs):  # noqa
         pass

File src/wheezy/html/ext/tests/test_mako.py

 
 except ImportError:  # pragma: nocover
 
-    def assert_mako_equal(text, expected, **kwargs):
+    def assert_mako_equal(text, expected, **kwargs):  # noqa
         pass

File src/wheezy/html/ext/tests/test_template.py

 
 except ImportError:  # pragma: nocover
 
-    def assert_template_equal(text, expected, **kwargs):
+    def assert_template_equal(text, expected, **kwargs):  # noqa
         pass

File src/wheezy/html/ext/tests/test_tenjin.py

 
 except ImportError:  # pragma: nocover
 
-    def assert_tenjin_equal(text, expected, **kwargs):
+    def assert_tenjin_equal(text, expected, **kwargs):  # noqa
         pass