Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ParzivalHack/PySpector
/ encode_node
Function
encode_node
src/pyspector/_ast_encode.py:53–55 ·
view source on GitHub ↗
Serialize a single AST node to JSON.
(node: ast.AST)
Source
from the content-addressed store, hash-verified
51
52
53
def
encode_node(node: ast.AST) -> str:
54
""
"Serialize a single AST node to JSON."
""
55
return
json.dumps(node, cls=AstEncoder)
Callers
2
test_encode_node_matches_ast_encoder_for_single_node
Method · 0.90
_build_ast_json_and_chunks
Function · 0.85
Calls
no outgoing calls
Tested by
1
test_encode_node_matches_ast_encoder_for_single_node
Method · 0.72