fastai / fastcore

Python supercharged for the fastai library
http://fastcore.fast.ai
Apache License 2.0
956 stars 275 forks source link

Allow docments to work with async function definitions #527

Closed kcaylor closed 4 months ago

kcaylor commented 1 year ago

docments does not properly handle async function definitions:

async def add_async(
    # The first operand
    a:int,
    # This is the second of the operands to the *addition* operator.
    # Note that passing a negative value here is the equivalent of the *subtraction* operator.
    b:int,
)->int: # The result is calculated using Python's builtin `+` operator.
    "Add `a` to `b`"
    return a+b

docments(add_async)

{'a': None, 'b': None, 'return': None}