Run any Python code quality tool on a Jupyter Notebook!
Project description
nbQA
Adapter to run any code-quality tool on a Jupyter notebook.
The general command is
nbqa <command> <root directory> <flags for command>
For example, you could run:
nbqa flake8 my_notebook.ipynb
nbqa black . --check
nbqa mypy --missing-imports
nbqa pytest . --doctest-modules
Installation: nbQA has no dependencies, so as long as you have Python3.6+, you can do
pip install -U nbqa
and it’ll work without conflicting with any of your existing installs!
Supported third party packages
In theory, nbqa can adapt any Python code-quality tool to a Jupyter Notebook.
In practice, here are the tools I’ve actually tested: - flake8 - black - pytest - mypy (make sure you will need to have __init__ files in each subdirectory) - doctest (as long as you run it via pytest with the –doctest-modules flag)
History
0.1.0 (2020-07-13)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.