blackcellmagic icon indicating copy to clipboard operation
blackcellmagic copied to clipboard

%%black will not format cell with magic in it

Open mborus opened this issue 7 years ago • 1 comments

When formatting cells with magic in it, like

  [...]
  import matplotlib.pyplot as plt
  import seaborn as sns
  import pandas as pd
  %matplotlib inline

the %%black magic returns the error cannot parse: 12:0 %matplotlib inline

This happens with any line that has a % sign to indicate magic.

mborus avatar Aug 13 '18 15:08 mborus

Here's an alternative solution that solves this issue: https://gist.github.com/MarvinT/a072aa992e977496974aaf492287b08c and https://marvint.github.io/Black-Jupyter/

MarvinT avatar Mar 27 '19 03:03 MarvinT