Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Notebook: Format Notebook" with Black completely mangles the notebook #7812

Closed
ldorigo opened this issue Oct 5, 2021 · 2 comments
Closed
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language

Comments

@ldorigo
Copy link

ldorigo commented Oct 5, 2021

Issue Type: Bug

Hello,

Formatting single cells with black works fine. I tried using the "format notebook" command, and it completely mangled my notebook - replacing random lines left and right and causing over an hour of work to recover my work (which is partly my fault for not committing more often - just mentioning it to point out it's a relatively bad bug).

I can provide the notebook on which this happens, it contains slightly private data so don't want to attach it publicly on this issue.

I've found an old issue #1060, which stated that formatting entire notebooks wasn't implemented yet - don't know if it's still valid? If that is the case, the command should be disabled until the functionality is implemented - rather than risking lots of lost work.

Extension version: 2021.8.2041215044
VS Code version: Code 1.60.2 (7f6ab5485bbc008386c4386d08766667e155244e, 2021-09-22T12:01:43.795Z)
OS version: Linux x64 5.14.6-zen1-1-zen
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 4800H with Radeon Graphics (16 x 1400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 2
Memory (System) 30.78GB (2.86GB free)
Process Argv --crash-reporter-id 9614dc43-c276-4d0e-94fc-c84de505d77f
Screen Reader no
VM 0%
DESKTOP_SESSION plasma-i3
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE-i3
XDG_SESSION_TYPE x11
@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Oct 6, 2021

@ldorigo I don't believe that you actually need to provide your file here. I just played with this a bit myself, and while it worked on some very basic files I was able to get some very mangled results with more complex files.

@IanMatthewHuff IanMatthewHuff removed their assignment Oct 6, 2021
@greazer greazer added bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language and removed needs-triage labels Oct 11, 2021
@greazer
Copy link
Member

greazer commented Oct 11, 2021

This is a dupe of: microsoft/vscode-python#16980. Should be fixed in the latest Python insiders extension. Will be released in a point release.

@greazer greazer closed this as completed Oct 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language
Projects
None yet
Development

No branches or pull requests

3 participants