Skip to main content

Run any Python code quality tool on a Jupyter Notebook!

Project description

nbQA

https://dev.azure.com/megorelli/megorelli/_apis/build/status/MarcoGorelli.nbQA?branchName=master https://img.shields.io/azure-devops/coverage/megorelli/megorelli/1/master.svg

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.

Source Distribution

nbqa-0.1.2.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

nbqa-0.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file nbqa-0.1.2.tar.gz.

File metadata

  • Download URL: nbqa-0.1.2.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for nbqa-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6eb025d0caab573a2dec7dd89d9a08cd0a20719c08b0e2969a28a79ced9849f3
MD5 6da6ca65a93040adaf2bcae625bfc384
BLAKE2b-256 a5b78b990e303a14f96d6bb7ae57a26be0be02f52edcd56f475165b83006dfd5

See more details on using hashes here.

Provenance

File details

Details for the file nbqa-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nbqa-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for nbqa-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 026fa8e86e5d6075e5840818dc6ebac773c28a1c3ad03f51a79c53196e7a1ebe
MD5 3ba05986760aea0b7b759ac961c67b8a
BLAKE2b-256 74f00fdd194f774ff8928ffd1772988020403b91114c5d06157ae53a82ad1f86

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page