drepr.utils.udf#

Classes

SourceTree(node, children)

UDFParsedResult(imports, monitor_variables, ...)

UDFParser(source_code)

class SourceTree(node: 'str', children: 'list[SourceTree]')[source]#

Bases: object

Parameters:
node: str#
children: list[drepr.utils.udf.SourceTree]#
get_simplified_dict()[source]#
class UDFParsedResult(imports: 'list[str]', monitor_variables: 'set[str]', source_tree: 'SourceTree')[source]#

Bases: object

Parameters:
imports: list[str]#
monitor_variables: set[str]#
source_tree: SourceTree#
class UDFParser(source_code: str)[source]#

Bases: object

Parameters:

source_code (str) –

parse(monitor_vars: Optional[list[str]] = None) UDFParsedResult[source]#
Parameters:

monitor_vars (Optional[list[str]]) –

Return type:

UDFParsedResult

remove_prefix_spaces(code: str) str[source]#
Parameters:

code (str) –

Return type:

str