Skip to content

Trailing underscores in types #444

Open
@KendrickLamarck

Description

@KendrickLamarck

Trailing underscores in types in the Parameters and Returns sections have to be escaped in order to not give an Unknown target name warning.

Examples that DON'T work :

def identity(object_):
    """Identity function.

    Parameters
    ----------
    object_ : Any

    Returns
    -------
    object_ : type(object_)
        Just `object_` again.
    """
    return object_

The returns section

Returns
-------
type(object_)
    Just `object_` again.

Without a name doesn't work either. In both cases, I have to write type(object\_).

I don't know if this is fixable like it was for parameter names (#63). I guess types are actually supposed to be links sometimes, in contrast to parameter names? Feel free to close if that is the case and there's just not really a possible fix.

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