@publisher('model')
def check_display_layer():
    if len(pm.ls(type='displayLayer')) > 1:
        raise PublishError(
            'There should be no <b>Display Layers</b> in the scene!!!'
        )
check if there are display layers
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/publish.py/check_display_layer