pythonloader

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PayloadVersion = 1

Variables

This section is empty.

Functions

func ProducerFile added in v0.6.0

func ProducerFile(command, analyzerCommand, analyzerMode, pythonPath, workingDirectory string) string

ProducerFile is the file whose content decides the facts of one pass: the bundled script for the adapters that run one, or the resolved executable for an external producer. The fact cache fingerprints it, so a change to the producer forces a re-observation instead of reusing what the previous producer said.

It resolves with the same rules as resolveCommand, on purpose: two resolution rules is how a cache ends up keyed on a file nobody runs. Editing the exact adapter used to leave the fingerprint untouched, and a rebuild republished facts the current code would not produce.

func Run

func Run(ctx context.Context, command, pythonPath string, repository workspace.Repository, workingDirectory string) (facts.SemanticPayload, error)

Run executes the configured Python indexer and decodes its versioned facts. When scip-python is not installed, the repository's deterministic AST worker is used as a development fallback; it intentionally reports dynamic cases as unresolved rather than guessing.

func RunWithOptions

func RunWithOptions(ctx context.Context, options Options, repository workspace.Repository, workingDirectory string) (facts.SemanticPayload, error)

RunWithOptions runs a type-aware producer when exact mode is requested and otherwise preserves the hermetic bundled fallback. External producers use the same JSON payload contract, so the normalizer remains the single source of durable identities and graph semantics.

Types

type Options

type Options struct {
	IndexerCommand   string
	AnalyzerCommand  string
	AnalyzerMode     string
	PythonPath       string
	IncludeTests     bool
	IncludeGenerated bool
	IncludeExternal  bool
}

Options configures one Python facts producer. AnalyzerMode is `fallback` for the bundled AST worker or `exact` for a configured type-aware producer.

Jump to

Keyboard shortcuts

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