Skip to content

Support module level docstrings #473

@philosofool

Description

@philosofool

I would like to add docstrings to my modules when working with nbdev, following PEP257 guidelines (afterall, the first way I look is just module? in Jupyter.)

The problem, for example:

I am exporting python code from a notebook example_maker.ipynb to a python file, example.py. When I do so, nbdev creates an __all__ statement at the top of the file. Adding an #export cell with a docstring to the first cell of example_maker.ipynb places the relevant 'docstring' below the __all__ statement that is autogenerated. This will not be recognized as a docstring and my linter also throws a no docstring error at me. Perhaps I have just missed how this functionality is supported via nbdev, but the examples in the documentation don't actually have module docstrings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions