Skip to content

Support multiple return variable docments #489

@gorkamunoz

Description

@gorkamunoz

This may be an enhancement, if it does not yet exist. Is it possible to have multiple return variable with their own description? This means, for instance, a function that outputs 2 different variables, for which I want to give details separately. My current solution involves stacking the description of all outputs in the details of the single return row as shown here:

def foo2(# input 1
         a:int = 5, 
         # input 2
         b:int = 5, 
         # first output: a+b
         # second output: a-b
        )-> int|int: 
    
    '''
    Test multiple outputs
   '''
    return a+b, a-b

which leads to the following table:

image

Is it possible to have a similar disposition as with inputs, where the name of the output or maybe just the details are shown for every output separately? I was digging into the numpy docstring documentation and couldn't find a way of doing this with that either.

Thanks!!

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