langchain_community.document_loaders.parsers.language.python.PythonSegmenter¶

class langchain_community.document_loaders.parsers.language.python.PythonSegmenter(code: str)[source]¶

Code segmenter for Python.

Methods

__init__(code)

extract_functions_classes()

is_valid()

simplify_code()

Parameters

code (str) –

__init__(code: str)[source]¶
Parameters

code (str) –

extract_functions_classes() List[str][source]¶
Return type

List[str]

is_valid() bool[source]¶
Return type

bool

simplify_code() str[source]¶
Return type

str