ucscsdk/ucsccoreutils.py
def search_class_id(class_id):
    """
    case insensitive search for class_id in meta.
    if unable to find exact class_id, this will also suggest matching class_id.

    Args:
        class_id (str): string matching class_id.(case insensitive)

    Returns:
        (str) or None

    Example:
        class_ids = search_class_id(class_id="ls")
    """

    from . import ucscmeta

    meta_class_id = find_class_id_in_mo_meta_ignore_case(class_id=class_id)

    if meta_class_id is not None:
        return meta_class_id

    # if class_id not exists in meta
    l_class_id = class_id.lower()
    class_ids = sorted([cid for cid in ucscmeta.MO_CLASS_ID
                        if re.search(l_class_id, cid, re.IGNORECASE)])
    if class_ids:
        log.info('"%s" did not match any available Class Ids.\n'
                 'Related Class Ids are:\n%s\n%s' %
                 (class_id,
                  "-"*len("Related Class Ids are:"),
                  "\n".join(class_ids)))
    else:
        log.info('"%s" did not match any available Class Ids.' % class_id)

    case insensitive search for class_id in meta.
    if unable to find exact class_id, this will also suggest matching class_id.

    Args:
        class_id (str): string matching class_id.(case insensitive)

    Returns:
        (str) or None

    Example:
        class_ids = search_class_id(class_id="ls")
    
case insensitive search for class_id in meta.
if unable to find exact class_id, this will also suggest matching class_id.
case insensitive search for class_id in meta . if unable to find exact class_id this will also suggest matching class_id .
def search_class_id(class_id):
    from . import ucscmeta
    meta_class_id = find_class_id_in_mo_meta_ignore_case(class_id=class_id)
    if meta_class_id is not None:
        return meta_class_id
    l_class_id = class_id.lower()
    class_ids = sorted([cid for cid in ucscmeta.MO_CLASS_ID
                        if re.search(l_class_id, cid, re.IGNORECASE)])
    if class_ids:
        log.info('"%s" did not match any available Class Ids.\n'
                 'Related Class Ids are:\n%s\n%s' %
                 (class_id,
                  "-"*len("Related Class Ids are:"),
                  "\n".join(class_ids)))
    else:
        log.info('"%s" did not match any available Class Ids.' % class_id)
def search_class_id ( class_id ) : from . import ucscmeta meta_class_id = find_class_id_in_mo_meta_ignore_case ( class_id = class_id ) if meta_class_id is not None : return meta_class_id l_class_id = class_id . lower ( ) class_ids = sorted ( [ cid for cid in ucscmeta . MO_CLASS_ID if re . search ( l_class_id , cid , re . IGNORECASE ) ] ) if class_ids : log . info ( '"%s" did not match any available Class Ids.\n' 'Related Class Ids are:\n%s\n%s' % ( class_id , "-" * len ( "Related Class Ids are:" ) , "\n" . join ( class_ids ) ) ) else : log . info ( '"%s" did not match any available Class Ids.' % class_id )
case insensitive search for class_id in meta.
case insensitive search for class_id in meta .
"""
    case insensitive search for class_id in meta.
    if unable to find exact class_id, this will also suggest matching class_id.

    Args:
        class_id (str): string matching class_id.(case insensitive)

    Returns:
        (str) or None

    Example:
        class_ids = search_class_id(class_id="ls")
    """ # if class_id not exists in meta
(str) or None
( str ) or None
class_id
string matching class_id.(case insensitive)
string matching class_id . ( case insensitive )
examples
class_ids = search_class_id(class_id="ls")
class_ids = search_class_id ( class_id = " ls " )