#710 Code Analysis issues with Elixir


I'm using Elixir (http://elixir.ematia.de/trac/wiki) in my project, but PyDev 1.3.17 complains with "Undefined variable from import". Elixir was installed with easy install using the --always-unzip option. I'm using Eclipse 3.3.2 under Ubuntu 8.04

A simple example to reproduce the problem are these two python scripts:

from elixir import Unicode, Entity, Field

class Record(Entity):
field = Field(Unicode)

from ElixirTest import Record
from elixir import metadata, setup_all, create_all

metadata.bind = "sqlite:///:memory:"
print Record.query().all()

On the last line PyDev marks Record and query() with the error "Undefined variable from import". If I define Record in ElixirTest2.py instead of importing it from ElixirTest.py, everything is fine.

I tried to set this code analysis to "ignore" in the PyDev settings dialog, but then the error is displayed as an info instead. (But setting it to "warning" gives indeed warnings).

So please fix the "ignore" setting to really ignore these messages and if possible improve the code analysis tool to not complaining about this code since it runs perfectly fine.


  • Steffen Siebert

    Steffen Siebert - 2010-01-21

    Patch to fix ignore setting for "undefined variable from import"

  • Steffen Siebert

    Steffen Siebert - 2010-01-21

    It's already 2010 and the bug is still not fixed in 1.5.4 :(

    So here is a patch which removes the "undefined variable from import" markers if I set the check to "ignore".

    Please note that the same bug (message is shown as info instead of ignoring it) seem also to affect most if not all other code analysis checks, so they should be fixed in a similar way.