Closed xoolive closed 5 years ago
Thank you for raising up this issue. I think that your solution is fine, I will check and update it as soon as possible. Thanks.
https://gist.github.com/MarvinT/a072aa992e977496974aaf492287b08c and https://marvint.github.io/Black-Jupyter/
Have examples for fixing this problem or an alternative method using code-prettify.
Hi @xoolive, I have fixed this issue using the code you suggested, also tested on both Jupyter Lab and Jupyter Notebook and it works fine, so please update to the latest version. Thank you.
Hi @MarvinT, Thank you for sharing, I have checked your repo out and see that it's really helpful and convenient. :D
Excellent! Works like a charm on my side.
The
line_number
parameter seems no longer valid in latest version ofblack
which makes lab_black fail (silently).The following quick fix seems to work ok for now, though I am not sure it is enough for addressing the issue properly.
Just for the record, since lab_black failed silently, I would recommend to change
into