Skip to main content

Module ast_helpers

Module ast_helpers 

Source
Expand description

Helper functions for AST traversal

Functionsยง

extract_decorator_names
Extract decorator names from a function definition
extract_function_name
Extract function name from various expression types
extract_string_literal
Extract string literal value
has_decorator
Check if a function has a specific decorator
is_simple_name
Check if an expression is a simple name (not a complex expression)
walk_statements
Walk through all statements in a module recursively