Skip to content

Using intellij to infer Python typing and add type comments using the `typing` module.

Notifications You must be signed in to change notification settings

aristotll/python-typing-adder

Repository files navigation

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.


About

Using intellij to infer Python typing and add type comments using the `typing` module.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published