Globals by project
Brought to you by:
fabioz
As Python is a very dynamic language it is not possible for the code analyser to find variables that are defined dynamical during runtime eg. globals. Therefore, PyDev already offers an option to define globals in options > window > preferences> pydev > pydev extensions > code analysis > undefined.
This could be improved:
1. Define globals by project.
2. Bigger multiline text box for easier input (if there are many globals in a project it can get very hard to keep track of them).
3. If the code analyser finds an undefined variable it should offer "add to project globals" as a quick fix.
(For further reference look at the post at: https://sourceforge.net/projects/pydev/forums/forum/293649/topic/3384671 )
4. Accept wildcards: If a global "GLOB" holds other objects, up to now these objects have to be defined to. A solution would be, if wildcards are accepted: "GLOB.*"
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
This is seriously needed. I work in a framework where, at runtime of file X, it can be assumed that file A has already been run in the same namespace and has side-effected the globals.
Thus, when I'm working on file X, I need PyDev to understand that the stuff from file A is already in the namespace - and to do analysis and completions appropriately.
The existing "code analysis > undefined" workaround would require me to type out every name from file A, and does not allow for code completion.
The best solution would be the ability to define, on a per-project basis, a set of files that can be assumed to have already run, and thus their global side effects are available for analysis/completion.