()
return profiles
List devices imported in the current module and generates a separated
    profile for each device variation.

    :rtype: dict
List devices imported in the current module and generates a separated
    profile for each device variation.
List devices imported in the current module and generates a separated profile for each device variation .
def _generate_profiles():
    """List devices imported in the current module and generates a separated
    profile for each device variation.

    :rtype: dict
    """
    profiles = {}
    for item in [globals()[name] for name in globals()]:
        if not isinstance(item, types.ModuleType):
            continue
        if not hasattr(item, "profile"):
            continue
        for model in item.profile["models"]:
            profile = item.profile.copy()
            profile_name = (model["vendor_id"], model["product_id"])
            del profile["models"]
            for k, v in model.items():
                if k == "override_defaults":
                    continue
                profile[k] = v
            # TODO override_defaults
            profiles[profile_name] = profile
    return profiles
def _generate_profiles ( ) : profiles = { } for item in [ globals ( ) [ name ] for name in globals ( ) ] : if not isinstance ( item , types . ModuleType ) : continue if not hasattr ( item , "profile" ) : continue for model in item . profile [ "models" ] : profile = item . profile . copy ( ) profile_name = ( model [ "vendor_id" ] , model [ "product_id" ] ) del profile [ "models" ] for k , v in model . items ( ) : if k == "override_defaults" : continue profile [ k ] = v # TODO override_defaults profiles [ profile_name ] = profile return profiles