@publisher(LOOK_DEV_TYPES + ['layout'])
def check_lights():
    all_lights = pm.ls(
        type=['light', 'aiAreaLight', 'aiSkyDomeLight', 'aiPhotometricLight']
    )
    if len(all_lights):
        pm.select(all_lights)
        raise PublishError(
            'There are <b>Lights</b> in the current scene:<br><br>%s<br><br>'
            'Please delete them!!!' %
            '<br>'.join(map(lambda x: x.name(), all_lights))
        )
checks if there are lights in the scene
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/publish.py/check_lights