Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 618 Bytes

README.md

File metadata and controls

40 lines (22 loc) · 618 Bytes

README


Using intellij to infer Python typing and

add type comments using the typing module.

See more from https://www.jetbrains.com/help/pycharm/2017.1/type-hinting-in-pycharm.html


Move cursor to the element, and press ctrl shift Y to add the type comments.

typing-comments-added


Before:

def greeting_with_type(name):
    return 'Hello ' + name

After:

def greeting_with_type(name):  # type: (str) -> str
    return 'Hello ' + name

It depends on the Python plugin of intellij, and I think Pycharm also works.