I just downloaded Pycharm Professional 2016.2.3, and for the simple example code below:
# -*- coding: utf-8 -*-
"""Simple test case"""
"""Simple test method"""
a = [1, 2, 3] # type: list[int]
Where I was trying to use local variable type hinting on the variable "a" to indicate that it is a list of integers. Although the type hinting works, Pycharm gives me this warning on the type hinting line:
Class 'type' does not define '__getitem__', so the '' operator cannot be used on its instances.
This warning obviously makes no sense, and although it does the break the code, the yellow warning indicator on the right annoys me. If this is not the right type hinting syntax for a list, what's the correct way? Thanks.