tokusumi / noglobal-magic

Magic command for jupyter notebook, to stop / warning function declaration including global variables. It helps to avoid side effect involving global variables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

noglobal-magic

Tests PyPI version

For Jupyter Notebook user's, noglobal-magic find global variables in a local scope.

With:

  • No need to wait executing a function
  • flake8 style ignoring-error annotation (# noqa)
  • no_global magic command makes raise error, and warn_global tells a just warning

Installation

Make sure you've this noglobal-magic (And the Python package pyflakes).

pip install noglobal-magic

How to use

In a cell on Jupyter Notebook, load and activate this extension:

%load_ext noglobal_magic
%no_global

You've ready to enjoy coding.

Let's see in colab how it works.

About

Magic command for jupyter notebook, to stop / warning function declaration including global variables. It helps to avoid side effect involving global variables.

License:MIT License


Languages

Language:Python 73.2%Language:Jupyter Notebook 26.5%Language:Shell 0.3%