Skip to content

Support function type annotation comment

Compare
Choose a tag to compare
@simon-ritchie simon-ritchie released this 19 May 08:22
· 35 commits to master since this release

Function type annotation comment (e.g. # type: ...) before docstring (following code snippet) is now supported.

def sample_func(sample_num):
    # type: (int) -> None
    """
    Sample description.
    ...
    """

See Also: PEP 484 -- Type Hints