Skip to content

[Feature Requests] What about making nbdev_separate to automatically separate imports and codes?  #1468

Open
@2catycm

Description

@2catycm

https://nbdev.fast.ai/getting_started.html#q-what-is-the-warning-found-a-cell-containing-mix-of-imports-and-computations.-please-use-separate-cells

This is a strong limitations to the usability of nbdev.

Every time I try to export docs, I spend hours cleaning up my code to sepearte imports and codes, reading tedious and annoying error messages from nbdev_docs.

We definitely have the ability to do this automatically. (since nbdev can produce warning messages about the situation)

Why not provide a simple tool like nbdev_separate, to automatically detect import lines in a cell and reformat them to a new cell above the original cell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions