<commit_before>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
BOSH OpenStack Ironic CPI
"""
# Python 2 and 3 compatibility
from __future__ import unicode_literals, print_function

import logging
import json



class MetaCPIAction(type):
    """
    Metaclass to register automatically all the CPI actions
    """

    # using __init__ rather than __new__ here because I want to modify 
    # attributes of the class *after* they have been created
    def __init__(cls, name, bases, dct):
        if not hasattr(cls, 'registry'):
            # this is the base class.  Create an empty registry
            cls.registry = {}
        else:
            # this is a derived class.  Add cls to the registry
            cls.registry[name.lower()] = cls
        super(MetaCPIAction, cls).__init__(name, bases, dct)

    # Metamethods, called on class objects:
    def __getitem__(cls, key):<commit_msg>add action class property<commit_after>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
BOSH OpenStack Ironic CPI
"""
# Python 2 and 3 compatibility
from __future__ import unicode_literals, print_function

import logging
import json



class MetaCPIAction(type):
    """
    Metaclass to register automatically all the CPI actions
    """

    # using __init__ rather than __new__ here because I want to modify 
    # attributes of the class *after* they have been created
    def __init__(cls, name, bases, dct):
        if not hasattr(cls, 'registry'):
            # this is the base class.  Create an empty registry
            cls.registry = {}
        else:
            # this is a derived class.  Add cls to the registry
            # if the class has the protocol attribute
            try:
                cls.registry[cls.action] = cls
            except:
                pass
        super(MetaCPIAction, cls).__init__(name, bases, dct)

    # Metamethods, called on class objects:
    def __getitem__(cls, key):
{'fraction_non_alphanumeric': 0.08471933471933472, 'fraction_numerical': 0.0031185031185031187, 'mean_word_length': 2.519195612431444, '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': '963452', 'n_tokens_mistral': 549, 'n_tokens_neox': 535, 'n_words': 204}