pyast

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package pyast provides shared Python AST traversal utilities for test framework parsers.

Index

Constants

View Source
const (
	NodeClassDefinition     = "class_definition"
	NodeDecorator           = "decorator"
	NodeDecoratedDefinition = "decorated_definition"
	NodeFunctionDefinition  = "function_definition"
)

Python AST node types.

Variables

This section is empty.

Functions

func GetDecoratedDefinition

func GetDecoratedDefinition(node *sitter.Node) *sitter.Node

GetDecoratedDefinition extracts the actual definition from a decorated_definition node.

func GetDecorators

func GetDecorators(node *sitter.Node) []*sitter.Node

GetDecorators extracts all decorator nodes from a decorated_definition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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