title: PyCharm type hinting doesn't work with overloaded operators
body: <p>This was sort of touched on in <a href="https://stackoverflow.com/questions/31231541/pycharm-type-error-message/31367247#31367247">this thread</a>, but never resolved.</p>
  
  <p>I have a vector class:</p>
  
  <pre><code>class Vector2D(object):
  
      # ...
  
      def __add__(self, other):
          return Vector2D(self.x + other.x, self.y + other.y)
  
      # ...
  
      def __truediv__(self, scalar):
          return Vector2D(self.x / scalar, self.y / scalar)
  </code></pre>
  
  <p>Then, I have a function that is type hinted to accept a Vector2D:</p>
  
  <pre><code>def foo(vector):
      """
      :type vector: Vector2D
      """
      print("&lt;{}, {}&gt;".format(vector.x, vector.y))
  </code></pre>
  
  <p>If I try to call <code>foo</code> like so, I get a strange warning saying <code>"Expected type 'Vector2D', got 'int' instead"</code>:</p>
  
  <pre><code>foo((Vector2D(1, 2) + Vector2D(2, 3)) / 2)
  </code></pre>
  
  <p>However, it works fine when I run it, and there is no warning when I explicitly use the methods of <code>Vector2d</code>:</p>
  
  <pre><code>foo(Vector2D(1, 2).__add__(Vector2D(2, 3)).__truediv__(2))
  </code></pre>
  
  <p>Please note I am using Python 2.7 but I have <code>from __future__ import division, print_function</code> at the top of all my modules.  Any help or advice appreciated.</p>