Skip to content

Dataclass renderring is a bit ugly #95

Open
@NicolasHug

Description

@NicolasHug

The way dataclasses are rendered is long and not super compact:

streammeta

This has to do with the template that we're using:

https://github.com/pytorch-labs/torchcodec/blob/ffda77a1311b04022bfb904c55749e6a2d6ce67f/docs/source/api_ref_decoders.rst?plain=1#L22

There are probably different ways this can be tweaked. If we remove the template, the default rendering is more compact:

dataclas2

but it comes with other issues like the __init__ being displayed twice. And the docstring of each attribute is truncated after the first ., which isn't good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions