pycode

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PycodeStreamParser

type PycodeStreamParser struct {
	// contains filtered or unexported fields
}

PycodeStreamParser implements the dataprep.Parser interface for Python code files

func NewPycodeStreamParser

func NewPycodeStreamParser() *PycodeStreamParser

NewPycodeStreamParser creates a new Python code stream parser

func (*PycodeStreamParser) GetSupportedTypes

func (p *PycodeStreamParser) GetSupportedTypes() []string

GetSupportedTypes returns the supported formats

func (*PycodeStreamParser) ParseStream

func (p *PycodeStreamParser) ParseStream(ctx context.Context, r io.Reader, metadata map[string]any) (<-chan *entity.Document, error)

ParseStream parses Python code from a reader and returns a channel of documents

func (*PycodeStreamParser) SetChunkOverlap

func (p *PycodeStreamParser) SetChunkOverlap(overlap int)

SetChunkOverlap sets the chunk overlap

func (*PycodeStreamParser) SetChunkSize

func (p *PycodeStreamParser) SetChunkSize(size int)

SetChunkSize sets the chunk size

func (*PycodeStreamParser) SetExtractClasses

func (p *PycodeStreamParser) SetExtractClasses(extract bool)

SetExtractClasses sets whether to extract classes

func (*PycodeStreamParser) SetExtractComments

func (p *PycodeStreamParser) SetExtractComments(extract bool)

SetExtractComments sets whether to extract comments

func (*PycodeStreamParser) SetExtractFunctions

func (p *PycodeStreamParser) SetExtractFunctions(extract bool)

SetExtractFunctions sets whether to extract functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL