jcrocholl/pep8 — pull request #337 by rvraghav93 (2014-10-06 00:12:16+00:00)
Title: Added support for ipynb files

IPython notebooks are basically json files from which the python code on a per cell basis can be extracted for pep8 checks. Although there is a [pep8 extension for ipython](https://github.com/ipython/ipython/wiki/Extensions-Index#pep8) which can be called on a per-cell basis, there seems to be [no clear way](http://stackoverflow.com/questions/26205629/verifying-pep8-in-exported-ipython-notebook-code) to do a pep8 check on an IPython notebook.

In this PR, I have included support for ipython notebook files

I have also included IPython Notebook specific report format that can be specified by `--format="ipynb"`

This outputs the line number relative to each cell in the output error report.
Sample output for [this](http://nbviewer.ipython.org/gist/rvraghav93/8a00bcc9b3c7da2f9118) file :

```
Untitled0.ipynb:Cell 1:3:1: E265 block comment should start with '# '
Untitled0.ipynb:Cell 3:1:1: E122 continuation line missing indentation or outdented
Untitled0.ipynb:Cell 3:4:80: E501 line too long (104 > 79 characters)
Untitled0.ipynb:Cell 5:1:1: E122 continuation line missing indentation or outdented
Untitled0.ipynb:Cell 5:1:31: E401 multiple imports on one line
Untitled0.ipynb:Cell 5:1:43: E251 unexpected spaces around keyword / parameter equals
Untitled0.ipynb:Cell 5:1:45: E251 unexpected spaces around keyword / parameter equals
Untitled0.ipynb:Cell 5:4:1: W293 blank line contains whitespace
Untitled0.ipynb:Cell 5:9:1: W293 blank line contains whitespace
Untitled0.ipynb:Cell 5:14:23: W291 trailing whitespace
```

I have also `autopep8`-ed the `pep8.py` file to fix a few minor pep8 styling issues ...