<commit_before># encoding: utf-8


class Extension(object):
    """A template of a WebCore 2 extension.
    
    Only the __init__ method is requried.
    
    The class attributes listed below control ordering and activation of other extensions.
    
    * @uses@ -- Used for extension sorting and dependency graphing.
    * @needs@ -- As per @uses@, but additionally activates those extensions.
    * @always@ -- If @True@ always load this extension.  Useful for applicaiton-provided extensions.
    * @never@ -- The opposite of @always@.
    * @first@ -- Always try to be first in the extension stack.
    * @last@ -- Always try to be last in the extension stack.
    * @provides@ -- A list of keywords usable in @uses@ and @needs@ declarations.
    
    The names of method arguments are unimportant; all values are passed positionally.
    """
    
    uses = []
    needs = []
    always = False
    never = False
    first = False
    last = False
    provides = []
    
    def __init__(self, config):
        """Executed to configure the extension.
        
        No actions must be performed here, only configuration management.
        
        You can also update the class attributes here.  It only really makes sense to add dependencies.
        """
        
        super(Extension, self).__init__()
    
    def __call__(self, app):
        """Executed to wrap the application in middleware.
        
        Accepts a WSGI application as the first argument and must likewise return a WSGI app.
        """
        
        return app
    <commit_msg>Added 'extensions' attribute of the extension template to allow you to define plugin entry_point namespaces.<commit_after># encoding: utf-8


class Extension(object):
    """A template of a WebCore 2 extension.
    
    Only the __init__ method is requried.
    
    The class attributes listed below control ordering and activation of other extensions.
    
    * @uses@ -- Used for extension sorting and dependency graphing.
    * @needs@ -- As per @uses@, but additionally activates those extensions.
    * @always@ -- If @True@ always load this extension.  Useful for applicaiton-provided extensions.
    * @never@ -- The opposite of @always@.
    * @first@ -- Always try to be first in the extension stack.
    * @last@ -- Always try to be last in the extension stack.
    * @provides@ -- A list of keywords usable in @uses@ and @needs@ declarations.
    * @extensions@ -- A tuple of entry_point namespaces to search for extensions.
    
    The names of method arguments are unimportant; all values are passed positionally.
    """
    
    uses = []
    needs = []
    always = False
    never = False
    first = False
    last = False
    provides = []
    extensions = ()
    
    def __init__(self, config):
        """Executed to configure the extension.
        
        No actions must be performed here, only configuration management.
        
        You can also update the class attributes here.  It only really makes sense to add dependencies.
        """
        
        super(Extension, self).__init__()
    
    def __call__(self, app):
        """Executed to wrap the application in middleware.
        
        Accepts a WSGI application as the first argument and must likewise return a WSGI app.
        """
        
        return app
    
{'fraction_non_alphanumeric': 0.07616191904047977, 'fraction_numerical': 0.0011994002998500749, 'mean_word_length': 2.2964426877470356, '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': '2443317', 'n_tokens_mistral': 859, 'n_tokens_neox': 838, 'n_words': 383}