<commit_before>#!/usr/bin/env python

'''Cached information about version and extensions of current GL
implementation.
'''

__docformat__ = 'restructuredtext'
__version__ = '$Id: $'

import warnings

# We have to wait until a context is created (with a window) until any
# information is available.
_have_context = False

# The information that gets filled in
_version = '0.0.0'
_vendor = ''
_renderer = ''
_extensions = []

# Called by GLContext when created and made current.
def set_context():
    from pyglet.GL.VERSION_1_1 import glGetString, glGetError
    from pyglet.GL.VERSION_1_1 import GL_VENDOR, GL_RENDERER, \
        GL_EXTENSIONS, GL_VERSION, GL_INVALID_ENUM, GL_INVALID_OPERATION

    global _have_context, _vendor, _renderer, _extensions, _version
    if _have_context:
        return

    _have_context = True
    _vendor = glGetString(GL_VENDOR)
    _renderer = glGetString(GL_RENDERER)
    _extensions = glGetString(GL_EXTENSIONS)<commit_msg>syntax cleanup<commit_after>#!/usr/bin/env python

'''Cached information about version and extensions of current GL
implementation.
'''

__docformat__ = 'restructuredtext'
__version__ = '$Id: $'

import warnings

# We have to wait until a context is created (with a window) until any
# information is available.
_have_context = False

# The information that gets filled in
_version = '0.0.0'
_vendor = ''
_renderer = ''
_extensions = []

# Called by GLContext when created and made current.
def set_context():
    from pyglet.GL.VERSION_1_1 import (glGetString, glGetError,
        GL_VENDOR, GL_RENDERER, GL_EXTENSIONS, GL_VERSION,
        GL_INVALID_ENUM, GL_INVALID_OPERATION)

    global _have_context, _vendor, _renderer, _extensions, _version
    if _have_context:
        return

    _have_context = True
    _vendor = glGetString(GL_VENDOR)
    _renderer = glGetString(GL_RENDERER)
    _extensions = glGetString(GL_EXTENSIONS)
{'fraction_non_alphanumeric': 0.08016877637130802, 'fraction_numerical': 0.006329113924050633, 'mean_word_length': 4.343661971830986, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7415515', 'n_tokens_mistral': 602, 'n_tokens_neox': 609, 'n_words': 175}