What is best way to ensure my python code in is compliant with PEP8 standards

I tried using jupyter-autopep8, didn’t work for me. I tried installed flake8 and pycodestyle_magic. flake8 didn’t work for me. pycodestyle_magic works but it isn’t checking many things like function names etc.
What’s the alternative? What does jupyter community prefer?

You can give GitHub - jupyter-lsp/jupyterlab-lsp: Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol a try. It will show linting errors from several sources if you install the pylsp server.


I tried the extension but it slows down the whole notebook; clicking on menu options, scrolling everything is effected. It also stops working without giving any specific error.

A detailed bug report would be very much appreciated. The traceback can be on the server side (it might be an error of the language server, not of the extension) or in the browser console - please follow bug reporting instructions, otherwise we cannot improve this extension.