On Tue, 2017-06-20 at 16:27 -0400, Randy Barlow wrote: > Can mypy handle finding the types from docblocks, or is it strict > about > the format being like: > > # type: (int, bool) > > ? To elaborate on my question, I've been doing docblocks in this style: def add(x, y): """ Return the sum of x and y. Args: x (int): The first number. y (int): The second number. Returns: int: The sum of x and y. """ return x + y It'd be suuuuuper nice if mypy could do that… ☺ If not, I guess I could include both annotatations, or perhaps only the mypy annotation so that I'm not adding duplicate info.
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx