[PYTHON] Use pycharm for input completion of local variable type

Hello sekitaka. I've forgotten it several times and googled it, so make a note of how to use Pycharm's local variable type input completion.

Input completion will be effective by specifying the type after type: in the comment of the variable declaration (assignment).

s = None # type: str

You can use str type input completion for the variable s like this.

pycharm_hinting.jpg

In addition, you can enable function input / output and various completions. Details can be found in the Official Documentation (https://www.jetbrains.com/help/pycharm/type-hinting-in-pycharm.html). I didn't quite get the word type hinting, so it took me a while to find this page.

Recommended Posts

Use pycharm for input completion of local variable type
Survey for practical use of BlockChain
Community version of IntelliJ IDEA, PyCharm is available for business / commercial use
[Python] How to use two types of type ()
Check the type of the variable you are using
Use the latest version of PyCharm on Ubuntu