title: How do I fix PyDev "Undefined variable from import" errors?
body: <p>I've got a Python project using PyDev in Eclipse, and PyDev keeps generating false errors for my code.  I have a module <code>settings</code> that defines a <code>settings</code> object.  I import that in module <code>b</code> and assign an attribute with:</p>
  
  <pre><code>from settings import settings
  settings.main = object()
  </code></pre>
  
  <p>In some of my code--but not all of it, statements like:</p>
  
  <pre><code>from settings import settings
  print settings.main 
  </code></pre>
  
  <p>... generate "Undefined variable from import: main" messages in the Eclipse code error pane, even though the code runs without a problem.  How can I correct these?</p>