title: How do I fix PyDev "Method should have self as first parameter" errors
body: <p>I'm developing in Python using PyDev in Eclipse, and some of my code generates errors in the code analysis tool.  Specifically:</p>
  
  <pre><code>class Group(object):
      def key(self, k):
          class Subkey(object):
              def __enter__(s):
                  self._settings.beginGroup(k)
                  return self
  
              def __exit__(s, type, value, tb):
                  self._settings.endGroup()
  
           return Subkey()
  </code></pre>
  
  <p>Gives me a <code>"Method '__enter__- group' should have self as first parameter"</code> error, and a similar error for <code>__exit__</code>.  Is there a way to solve this without assigning <code>self</code> to another variable and reusing the variable in the other method signatures?</p>