Skip to main content

Flake8 based checking for jupyter notebooks

Project description

flake8-nb

PyPi Version Conda Version Supported Python Versions Pre-commit License

Actions Status Documentation Status Testing Coverage Documentation Coverage Dependabot Status

Code quality All Contributors Code style Python: black Binder

flake8 checking for jupyter notebooks. Basically this is a hack on the flake8's Application class, which adds parsing and a cell based formatter for *.ipynb files.

This is NOT A PLUGIN but a stand alone CLI tool/pre-commit hook to be used instead of the flake8 command/hook.

Features

  • flake8 CLI tests for jupyter notebooks
  • Full base functionality of flake8 and its plugins
  • Input cell based error formatting
  • Report fine tuning with cell-tags (flake8-noqa-tags see usage)

Example

If you had a notebook with name example_notebook.ipynb, where the code cell which was executed as 34th cell (In[34]) had the following code:

bad_formatted_dict = {"missing":"space"}

running flake8_nb would result in the following output.

$ flake8_nb example_notebook.ipynb
example_notebook.ipynb#In[34]:1:31: E231 missing whitespace after ':'

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Sebastian Weigand

💻 🤔 🚧 📆 🚇 ⚠️ 📖

Jt Miclat

🐛

Philipp Eisenhauer

🐛

Shoma Okamoto

⚠️

Marco Gorelli

🔧 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_nb-0.2.7.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

flake8_nb-0.2.7-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file flake8_nb-0.2.7.tar.gz.

File metadata

  • Download URL: flake8_nb-0.2.7.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for flake8_nb-0.2.7.tar.gz
Algorithm Hash digest
SHA256 787fc8adaee871c8b2189ced1e15e75a70dc340681e9750f3100fb595699a7f3
MD5 95f83c61746fa35b2e632a2e6a542c96
BLAKE2b-256 e3596f396c2ca46935722a19ebe1ab0d3920c9782101bda7e529407274f86ef7

See more details on using hashes here.

File details

Details for the file flake8_nb-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: flake8_nb-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for flake8_nb-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1a11a61819e0dab46d12ee7ff1813549a418a7cb4c72caa9d3e9a494bab1e9
MD5 2842133bd8bbe753f4c4700f43bf878f
BLAKE2b-256 ce04f3edcfc01c7f0003f94ab04e7e1ff39373d6612ce04745bd15dfa526a5e5

See more details on using hashes here.

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