Repository: getpelican/pelican

Issue:
flake8 PEP8 violations
With the latest upstream clone:

```
(pep8=) ~/work/omiday/pelican/pelican $ git log -1 HEAD
commit b2231c40f7ddcf01dcb301ba599b517fb23102de
Merge: 0942fcb f803120
Author: Justin Mayer <entroP@gmail.com>
Date:   Fri Oct 7 12:28:10 2016 -0600

    Merge pull request #2016 from jerryasher/copy_file_metadata

    Python's shutil.copy2 fails on Android
```

I'm seeing:

```
(pep8=) ~/work/omiday/pelican/pelican $ flake8
./setup.py:3:1: F401 'os.path.dirname' imported but unused
./setup.py:3:1: I101 Imported names are in the wrong order. Should be dirname, join, relpath
./setup.py:34:80: E501 line too long (93 > 79 characters)
./setup.py:35:80: E501 line too long (86 > 79 characters)
./setup.py:39:80: E501 line too long (83 > 79 characters)
./setup.py:43:80: E501 line too long (95 > 79 characters)
./setup.py:50:10: E131 continuation line unaligned for hanging indent
./docs/conf.py:3:11: E401 multiple imports on one line
./docs/conf.py:9:1: E402 module level import not at top of file
./docs/conf.py:11:80: E501 line too long (80 > 79 characters)
./docs/conf.py:13:80: E501 line too long (81 > 79 characters)
./docs/conf.py:33:80: E501 line too long (80 > 79 characters)
./docs/conf.py:66:80: E501 line too long (80 > 79 characters)
./docs/conf.py:69:4: E128 continuation line under-indented for visual indent
./docs/conf.py:72:80: E501 line too long (80 > 79 characters)
```

Got the go ahead from @justinmayer on IRC so I'm gonna try fixing those. 



Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,16 +1,19 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
-import sys, os
+import os
+import sys
+
+from pelican import __version__
 
 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
 
 sys.path.append(os.path.abspath(os.pardir))
 
-from pelican import __version__
-
-# -- General configuration -----------------------------------------------------
+# -- General configuration ----------------------------------------------------
 templates_path = ['_templates']
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.extlinks']
+extensions = ['sphinx.ext.autodoc',
+              'sphinx.ext.ifconfig',
+              'sphinx.ext.extlinks']
 source_suffix = '.rst'
 master_doc = 'index'
 project = 'Pelican'
@@ -30,7 +33,7 @@
     'pelican-doc':  ('http://docs.getpelican.com/%s/', '')
 }
 
-# -- Options for HTML output ---------------------------------------------------
+# -- Options for HTML output --------------------------------------------------
 
 html_theme = 'default'
 if not on_rtd:
@@ -63,13 +66,13 @@ def setup(app):
     app.add_stylesheet('theme_overrides.css')   # path relative to _static
 
 
-# -- Options for LaTeX output --------------------------------------------------
+# -- Options for LaTeX output -------------------------------------------------
 latex_documents = [
-    ('index', 'Pelican.tex', 'Pelican Documentation',
-   'Alexis Métaireau', 'manual'),
+    ('index', 'Pelican.tex', 'Pelican Documentation', 'Alexis Métaireau',
+     'manual'),
 ]
 
-# -- Options for manual page output --------------------------------------------
+# -- Options for manual page output -------------------------------------------
 man_pages = [
     ('index', 'pelican', 'pelican documentation',
      ['Alexis Métaireau'], 1),
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 from os import walk
-from os.path import join, relpath, dirname
+from os.path import join, relpath
 
 from setuptools import setup
 
@@ -31,22 +31,22 @@
     long_description=README + '\n' + CHANGELOG,
     packages=['pelican', 'pelican.tools'],
     package_data={
-        # we manually collect the package data, as opposed to using include_package_data=True
-        # because we don't want the tests to be included automatically as package data
-        # (MANIFEST.in is too greedy)
-        'pelican': [
-            relpath(join(root, name), 'pelican')
-            for root, _, names in walk(join('pelican', 'themes')) for name in names
-        ],
-        'pelican.tools': [
-            relpath(join(root, name), join('pelican', 'tools'))
-            for root, _, names in walk(join('pelican', 'tools', 'templates')) for name in names
-        ],
+        # we manually collect the package data, as opposed to using,
+        # include_package_data=True because we don't want the tests to be
+        # included automatically as package data (MANIFEST.in is too greedy)
+        'pelican': [relpath(join(root, name), 'pelican')
+                    for root, _, names in walk(join('pelican', 'themes'))
+                    for name in names],
+        'pelican.tools': [relpath(join(root, name), join('pelican', 'tools'))
+                          for root, _, names in walk(join('pelican',
+                                                          'tools',
+                                                          'templates'))
+                          for name in names],
     },
     install_requires=requires,
     entry_points=entry_points,
     classifiers=[
-        'Development Status :: 5 - Production/Stable',
+         'Development Status :: 5 - Production/Stable',
          'Environment :: Console',
          'License :: OSI Approved :: GNU Affero General Public License v3',
          'Operating System :: OS Independent',


Test patch: