fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.8k stars 484 forks source link

keyword only '*' does not work with documentation #1369

Open CyprienRicque opened 9 months ago

CyprienRicque commented 9 months ago

Example

Hello! Using keyword only argument such as:

#| export

def super_func(
        keyword_or_non_keyword_arg, # this is a keyword or non-keyword arg
        *, 
        keyword_only_arg # this is a keyword only arg 
) -> str: # return string
    "super func"
    ... 

makes the documentation not working:

show_doc(super_func)
super_func
 super_func (keyword_or_non_keyword_arg, keyword_only_arg)
super func
| | Type | Details | | – | ——– | ———– | | keyword_or_non_keyword_arg | | this is a keyword or non-keyword arg | | keyword_only_arg | | | | Returns | str | return string |

the documentation for keyword_only_arg is absent

image

Configuration

Python 3.7.16 nbdev 2.3.12