You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QueueItem=Union[asyncio.Future, str]
# the expansion of `Optional` makes me realize that `wait: bool=False` is probably more correctasyncdefpump_queue(queue: Deque[QueueItem], wait: Optional[bool]=False) ->AsyncGenerator[str, None]:
""" foo Args: queue (Deque[QueueItem]): wait (Optional[bool]): Returns: AsyncGenerator[str, None]: """
the docstring parser doesn't interpret types at all (QueueItem isn't expanded like it is in the function definition)
the type hints already give us enough information to build args, returns, etc… so it might be smarter to ignore/combine the types from the docstring when type hints are present.
Returns: AsyncGenerator[…] is probably more accurate than saying this yields, but I'm not sure.
it's uglier than the source code
Do you have any ideas on how/if return types should be reconciled with the implied return types from the await and async for … prefixes that sphinxcontrib-trio adds?
Is PEP484 and/or modifying docstring parsing behavior in-scope for this extension at all?
I tried to
autofunctionthis function:Result:
There are a few problems with this:
QueueItemisn't expanded like it is in the function definition)Returns: AsyncGenerator[…]is probably more accurate than saying thisyields, but I'm not sure.Do you have any ideas on how/if return types should be reconciled with the implied return types from the
awaitandasync for …prefixes that sphinxcontrib-trio adds?Is PEP484 and/or modifying docstring parsing behavior in-scope for this extension at all?