pythonref

package
v0.0.0-...-8593d01 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesEntityPath

func MatchesEntityPath(target ModuleTarget, entPath string) bool

MatchesEntityPath reports whether entPath (relative to target.Dir) belongs to the resolved module target.

func SetDefaultProjectRoot

func SetDefaultProjectRoot(root string)

SetDefaultProjectRoot records the project tree used for python resolution when workDir is omitted (list/doc filters, etc.). Safe to call from NewResolver/serve.

Types

type ModuleTarget

type ModuleTarget struct {
	Dir       string
	File      string
	IsPackage bool
}

func ResolveModuleTarget

func ResolveModuleTarget(spec, workDir string) (ModuleTarget, error)

ResolveModuleTarget resolves a python:<module> spec into a concrete ingest scope directory plus the module file name used for symbol/doc filtering. workDir is the project root (serve/browse --dir); empty falls back to SetDefaultProjectRoot (not process cwd). Resolution prefers that tree's .venv/bin/python so site-packages match the project.

type SymbolTarget

type SymbolTarget struct {
	Dir  string
	Name string
}

func ResolveSymbolTarget

func ResolveSymbolTarget(spec, symbol, workDir string) (SymbolTarget, bool, error)

ResolveSymbolTarget resolves python:<module>::<symbol> to an ingest target.

Jump to

Keyboard shortcuts

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