Skip to content

Avoiding rtype checks with typed code: No return type or annotation at ':return: ... #125

@ssbarnea

Description

@ssbarnea

Describe the bug

Once a library adopts type support is it very unlikely that the maintainers will want to duplicate the type information inside the docstrings. That duplication is a real maintenance issue and also a permanent source of bugs, as it is very easy to miss updating the docstring when changing the type.

I personally faced

_warn(docstring, 0, f"No return type or annotation at '{parsed_directive.line}'")
and I see no way to disable that kind of check.

That typing issue is so important that we are willing to switch to a different docstring format.

Currently we use sphinx for historical reasons and anything going towards markdown and less verbosity/duplication would be appealing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions