[IPython-dev] PEP8 Check For IPython Notebook - A small work around
takowl at gmail.com
Mon Oct 6 18:35:33 EDT 2014
Thanks Raghav! From the conversation on your issue, it looks like it might
make sense for your code to live as a flake8 extension.
On 6 October 2014 01:18, Raghav Rv <rvraghav93 at gmail.com> wrote:
> Hi all,
> I recently modified the pep8 project a little to allow pep8 checks to be
> run on ipython notebook, inspired by this stack overflow post
> [ Though we do have an extension that can check for pep8 on a per-cell
> basis, this modification can help us run pep8 for a whole ".ipynb" file. ]
> Using the --format="ipynb" flag we can get the line number offset (
> calculated for each individual cell ) and the cell number in the error
> report, to easily locate errors.
> This is the pull request : https://github.com/jcrocholl/pep8/pull/337
> ( Looks like this won't be merged as the devs of pep8 feel this is out of
> scope for the project. )
> I am just posting it here ( as advised by Matt ), just incase someone
> finds it useful ...
> Sample Notebook
> Result of running : `python pep8.py --format="ipynb" notebook.ipynb` on
> the above notebook. ( Output seems to be consistent with that of the pep8
> check on the converted ".py" file )
> Output <https://gist.github.com/rvraghav93/61f98948a4e0464d2cd3>
> Raghav Rv ( rvraghav93 )
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev