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.

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_formated_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!

History

0.2.3 (2020-10-02)

  • Fixed pre-commit hook file association so it support python and juypter notebooks

0.2.1 (2020-08-11)

  • Forced uft8 encoding when reading notebooks, this prevents errors on windows when console codepage is assumed

0.2.0 (2020-07-18)

  • Added pre-commit hook (#47)

0.1.8 (2020-06-09)

  • Set max supported version of flake8 to be <=3.8.3

0.1.7 (2020-05-25)

  • Set max supported version of flake8 to be <=3.8.2

0.1.6 (2020-05-20)

  • Set max supported version of flake8 to be <=3.8.1
  • Fixed bug with --exclude option

0.1.4 (2020-01-01)

  • Set max supported version of flake8 to be <3.8.0, to prevent breaking due to changes of flake8's inner workings.

0.1.3 (2019-11-13)

  • Added official Python 3.8 support and tests

0.1.2 (2019-10-29)

  • Fixed compatibility with flake8==3.7.9

0.1.1 (2019-10-24)

  • Added console-script 'flake8-nb' as an alias for 'flake8_nb'

0.1.0 (2019-10-22)

  • First release on PyPI.

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.3.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

flake8_nb-0.2.3-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flake8_nb-0.2.3.tar.gz
  • Upload date:
  • Size: 38.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for flake8_nb-0.2.3.tar.gz
Algorithm Hash digest
SHA256 2d73929cfc5c9f32b87dbb4c218f127edd50c76c66607e5a3d5cc0ed790a4b70
MD5 8bb3e88d62eb9933f4842b2df2a5ebf4
BLAKE2b-256 ee52bb565b3b8bc8022eb689dfe4d7430d4d98d4c75458b707df14adb5a090b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flake8_nb-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for flake8_nb-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba533baf1f419fbd47d4e821934944d4e03bc0c9a73526125fe1dadac7d12d34
MD5 df28db004fec8b450963c0d8f2fdf617
BLAKE2b-256 23abe6b337a539f35c54a1f97907e26684dfb0be7e15fe832b724f8bed2aa627

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