code analysis will mark "Log" (which is an object instance) as undefined variable:
Log.Write('$ running %s version %s $'%(module, script_version))
"Log" is an injected instance and does not get defined or instantiated anywhere in the py code.
Adding "Log" to the PyPev Preferences under "consider the following names as globals" will not change code analysis behavior of flagging it as undefined.
Is there any way to change this and don't have it appear as undefined.
close but not yet there.
Unfortunately there is no python module that defines the the class for the instantiated Log that I could add the suggested code analysis directive to.
We run our python scripts embedded and do pass the log object from the process the python interpreter is embedded in to the executed script.
Non the less pyDev(ext) have become very handy for writing the code with the one downside that we have all (there are more than just Log) our injected instances as being not defined. Which kind of bloats the problems list.
Any other hints ?
Hummm... Ok, understood...
Actually, it should work when you add it to the preferences as "consider the following names as globals". It does work if you just access 'Log' without any attribute access, but it doesn't when you do 'Log.write' -- so, it's a bug that should be fixed... I'll try to make that for the next release.
It's in the preferences and yes it does work with accessing Log directly as in:
But not with the attributes as illustrated before.
Having that in the next release would be great.
I checked this in the current release 1.3.10 and did not find any changes in the behavior.
Did you make any changes to improve this or has it been pushed back to a later release?
Should I enter a bug track or feature request entry to keep this in focus?
Tanks for your efforts.
It was pushed to a later release... Please report it as a bug (I usually pick what to do from the feature/bug requests).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.