Skip to content

Jupyter Notebook outputs raw source code upon fixing via stdin #7747

@charliermarsh

Description

@charliermarsh

If you run, e.g., cat Untitled.ipynb | cargo run -p ruff_cli -- check --stdin-filename Untitled.ipynb -n --fix, then the content we write to stdout is the fixed source code. Writing this back to the notebook will leave you with an invalid notebook! Instead, we need to write back the entire JSON structure, including the fixed content.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcliRelated to the command-line interface

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions