AnswerDotAI / nbdev

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

Union type produces unreadable docstring results using show_doc #603

Closed seanyboi closed 2 years ago

seanyboi commented 2 years ago

Hi there,

I have a class defined like so:

def __init__(self, x:Union[List[str],str], y:str, z:str):

and it produces a docstring like so when using shoc_doc(Class.__init__)

LockdownDates.init(country:Union[List[str],str\], **start_date**:str, **end_date**:str`)

Any help would be appreciated thank you!

jph00 commented 2 years ago

Thanks @seanyboi . @muellerzr is going to look at this shortly