[ pyopengl-Bugs-3588058 ] Enumerants not visible to PyLint, PyCharm, static analysis

SourceForge.net <[email protected]> Fri, 16 Nov 2012 15:33:12 -0800
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #3588058, was opened at 2012-11-16 15:33
Message generated for change (Tracker Item Submitted) made by codewarrior0
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3588058&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: codewarrior0 (codewarrior0)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enumerants not visible to PyLint, PyCharm, static analysis

Initial Comment:
In the file OpenGL/raw/GL/VERSION/GL_1_1.py and others, the OpenGL constants are defined using a long constant string and an "unpack_constants" function that inserts them into the module namespace. This technique makes the constants completely invisible to static analysis tools such as PyLint and PyCharm's Inspection feature. This means I have dozens of red underlines all over any code that uses OpenGL, and I can't autocomplete any GL constants either.

It looks like unpack_constants is only used to evaluate the results of get_gl_extensions and that script could probably be changed to just output e.g. GL_BYTE = Constant(0x1400). (Wasn't it like this for earlier versions of PyOpenGL? Sorry, I'm not good enough at bzr to know how to show a file's history.) I'm interested in getting this changed and I am willing to make whatever changes are needed.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3588058&group_id=5988

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net