google-research / python-graphs

A static analysis library for computing graph representations of Python programs suitable for use with graph neural networks.
Apache License 2.0
325 stars 39 forks source link

Add optional `node` argument to `get_ast_nodes_of_type`. #20

Open dan-zheng opened 1 year ago

dan-zheng commented 1 year ago

This enables getting all nodes with an AST type that are also descendants of root node node.

dan-zheng commented 1 year ago

Todo: add tests.