Esempio n. 1
0
def validate_private_function(code: ast.FunctionDef,
                              sig: FunctionSignature) -> None:
    """ Validate private function defintion """
    if sig.is_default_func():
        raise FunctionDeclarationException(
            'Default function may only be public.', code)
Esempio n. 2
0
def validate_internal_function(code: ast.FunctionDef,
                               sig: FunctionSignature) -> None:
    """ Validate internal function defintion """
    if sig.is_default_func():
        raise FunctionDeclarationException(
            "Default function may only be external.", code)