PyCharm does not recognize dictionary value type
<p>I have a simple code snippet where I set dictionary values as empty lists:</p>

<pre><code>new_dict = {}
for i in range(1, 13):
    new_dict[i] = []
</code></pre>

<p>Now, if inside the loop on the next line I would type <code>new_dict[i]</code> and add a dot, I expect PyCharm to show me a list of methods available for a <code>list</code>, but PyCharm fails to recognize the dictionary value type in this simple case:</p>

<p><a href="https://i.stack.imgur.com/X2vTf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X2vTf.png" alt="enter image description here"></a></p>

<p>Why is it happening and what can I do? Using PyCharm 2016.1.2, Python 2.7.10.</p>

<hr>

<p>As a workaround, I can explicitly add a <a href="https://www.jetbrains.com/help/pycharm/5.0/type-hinting-in-pycharm.html" rel="nofollow noreferrer">type hint</a>, letting PyCharm know that <code>new_dict</code> is a dictionary where keys are integers and values are lists by adding a <code># type: dict[int, list]</code> inline comment:</p>

<p><a href="https://i.stack.imgur.com/LeaCH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LeaCH.png" alt="enter image description here"></a></p>