<commit_before>""" Imports Maya API methods in the 'api' namespace, and defines various utilities for Python<->API communication """

# They will be imported / redefined later in Pymel, but we temporarily need them here
import sys, inspect, time, os.path

import pymel.api as api
from pymel.util import expandArgs
import pymel.util as _util
import startup
import plogging as _plogging

_logger = _plogging.getLogger(__name__)

__all__ = ['reservedMayaTypes', 'reservedApiTypes', 'apiTypesToApiEnums', 'apiEnumsToApiTypes',  
'mayaTypesToApiTypes', 'apiTypesToApiClasses', 'apiTypeHierarchy', 'apiClassInfo',
'apiToMelData', 'apiClassOverrides']

class Enum(tuple):
    def __str__(self): return '.'.join( [str(x) for x in self] )
    def __repr__(self): return repr(str(self))
    def pymelName(self, forceType=None):
        parts = list(self)
        if forceType:
            parts[0] = forceType
        else:
            mfn = getattr( api, self[0] )
            mayaTypeDict = apiCache.apiEnumsToMayaTypes[ mfn().type() ]
            parts[0] = _util.capitalize( mayaTypeDict.keys()[0] )

        return '.'.join( [str(x) for x in parts] )
    
def _makeDgModGhostObject(mayaType, dagMod, dgMod):
    # we create a dummy object of this type in a dgModifier (or dagModifier)
    # as the dgModifier.doIt() method is never called, the object<commit_msg>apicache: fixed a bug when rebuilding api caches where Enum class could not be found<commit_after>""" Imports Maya API methods in the 'api' namespace, and defines various utilities for Python<->API communication """

# They will be imported / redefined later in Pymel, but we temporarily need them here
import sys, inspect, time, os.path

import pymel.api as api
from pymel.util import expandArgs
import pymel.util as _util
import startup
import plogging as _plogging

_logger = _plogging.getLogger(__name__)

__all__ = ['reservedMayaTypes', 'reservedApiTypes', 'apiTypesToApiEnums', 'apiEnumsToApiTypes',  
'mayaTypesToApiTypes', 'apiTypesToApiClasses', 'apiTypeHierarchy', 'apiClassInfo',
'apiToMelData', 'apiClassOverrides']

class Enum(tuple):
    def __str__(self): return '.'.join( [str(x) for x in self] )
    def __repr__(self): return repr(str(self))
    def pymelName(self, forceType=None):
        parts = list(self)
        if forceType:
            parts[0] = forceType
        else:
            mfn = getattr( api, self[0] )
            mayaTypeDict = apiCache.apiEnumsToMayaTypes[ mfn().type() ]
            parts[0] = _util.capitalize( mayaTypeDict.keys()[0] )

        return '.'.join( [str(x) for x in parts] )

api.Enum = Enum

def _makeDgModGhostObject(mayaType, dagMod, dgMod):
    # we create a dummy object of this type in a dgModifier (or dagModifier)
    # as the dgModifier.doIt() method is never called, the object
{'fraction_non_alphanumeric': 0.10543245175125089, 'fraction_numerical': 0.0028591851322373124, 'mean_word_length': 3.8763066202090593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3071170', 'n_tokens_mistral': 908, 'n_tokens_neox': 896, 'n_words': 283}