示例#1
0
def validate_structured_asset_key(l):
    if len(l) == 0:
        raise DagsterInvalidAssetKey()

    for s in l:
        validate_asset_key_string(s)

    return l
示例#2
0
def validate_asset_key_string(s):
    if not s or not ASSET_KEY_REGEX.match(s):
        raise DagsterInvalidAssetKey()

    return s