AnswerDotAI / AnswerDotAI/fastcore

Support multiple return variable docments

Open
#489 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.1k
Forks
295
Avg merge
1d 6h
Merged PRs (30d)
7

Description

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](https://user-images.githubusercontent.com/25931612/192982766-90115eb4-84c9-47ff-8a7d-a81de1e9901e.png)

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!!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the foo2 example and comparing its generated return table with the input table described in the issue. Determine how multiple return values are currently represented and define completion as rendering each output with its own name or description.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.