python

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxWaitDuration = 5 * time.Second

Variables

This section is empty.

Functions

func CheckPythonVersion added in v0.2.0

func CheckPythonVersion() error

func CheckRepo

func CheckRepo(repo string) (string, time.Duration)

func GetDefaultLSP

func GetDefaultLSP() (lang uniast.Language, name string)

func InstallLanguageServer added in v0.2.0

func InstallLanguageServer() (string, error)

Types

type PythonSpec

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

func NewPythonSpec

func NewPythonSpec() *PythonSpec

func (*PythonSpec) DeclareTokenOfSymbol

func (c *PythonSpec) DeclareTokenOfSymbol(sym lsp.DocumentSymbol) int

func (*PythonSpec) FileImports

func (c *PythonSpec) FileImports(content []byte) ([]uniast.Import, error)

func (*PythonSpec) FunctionSymbol

func (c *PythonSpec) FunctionSymbol(sym lsp.DocumentSymbol) (int, []int, []int, []int)

returns: receiver, typeParams, inputParams, outputParams

func (*PythonSpec) GetUnloadedSymbol

func (c *PythonSpec) GetUnloadedSymbol(from lsp.Token, define lsp.Location) (string, error)

func (*PythonSpec) HasImplSymbol

func (c *PythonSpec) HasImplSymbol() bool

func (*PythonSpec) ImplSymbol

func (c *PythonSpec) ImplSymbol(sym lsp.DocumentSymbol) (int, int, int)

returns interface, receiver, first method

func (*PythonSpec) IsDocToken

func (c *PythonSpec) IsDocToken(tok lsp.Token) bool

func (*PythonSpec) IsEntitySymbol

func (c *PythonSpec) IsEntitySymbol(sym lsp.DocumentSymbol) bool

func (*PythonSpec) IsEntityToken

func (c *PythonSpec) IsEntityToken(tok lsp.Token) bool

func (*PythonSpec) IsMainFunction

func (c *PythonSpec) IsMainFunction(sym lsp.DocumentSymbol) bool

func (*PythonSpec) IsPublicSymbol

func (c *PythonSpec) IsPublicSymbol(sym lsp.DocumentSymbol) bool

func (*PythonSpec) IsStdToken

func (c *PythonSpec) IsStdToken(tok lsp.Token) bool

func (*PythonSpec) NameSpace

func (c *PythonSpec) NameSpace(path string, file *uniast.File) (string, string, error)

returns: modName, pkgPath, error

func (*PythonSpec) ProtectedSymbolKinds added in v0.2.0

func (c *PythonSpec) ProtectedSymbolKinds() []lsp.SymbolKind

func (*PythonSpec) ShouldSkip

func (c *PythonSpec) ShouldSkip(path string) bool

func (*PythonSpec) TokenKind

func (c *PythonSpec) TokenKind(tok lsp.Token) lsp.SymbolKind

func (*PythonSpec) WorkSpace

func (c *PythonSpec) WorkSpace(root string) (map[string]string, error)

Jump to

Keyboard shortcuts

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