I want to run Pylint or any equivalent while using Jupyter-Notebook. Is there a way to install and run Pylint this way?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
No, you can not introduce pylint into jupyter notebook.
If you want to check your code style, you need jupyter notebook's extensions.
Possible this one:
https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/code_prettify
pycodestyle is an equivalent of
pylint
for Jupyter Notebook which is able to check your code against thePEP8
style guide.First, you need to install the
pycodestyle
injupyter notebook
by typing this command,Run this command in a cell of jupyter notebook. After successful installation, you have to load the magic in a Jupyter Notebook cell like this,
Then, you have to use
pycodestyle
in a cell in which you want to investigate your code againstPEP8
standards.Below are some examples for more and clear understanding,
Output:
pycodestyle
will give you this message,Another example,
Output: