hug icon indicating copy to clipboard operation
hug copied to clipboard

Hug and mypy?

Open dstromberg opened this issue 8 years ago • 1 comments

Hi.

Does hug's use of type annotations play nicely with mypy's use of type annotations?

Thanks.

dstromberg avatar Sep 17 '17 17:09 dstromberg

No it doesn't. I've just ended up listing each function arguments on its own line with the # type: ignore comment:

@hug.post('/foo')
def foo(
    name: hug.types.text,  # type: ignore
    is_cool: hug.types.boolean  # type: ignore
):
    ...

akaihola avatar Jan 08 '19 12:01 akaihola