I just wanted to highlight that the ability to iterate over the graph should be more prominent in the reference docs, since it is such a typical use case.
In fact, I thought, this would come intuitively:
mg = modulegraph2.ModuleGraph()
mg.add_module('test_import')
for I in mg:
print(i)
but got a TypeError: 'ModuleGraph' object is not iterable
Then looking how .report() was implemented highlighted the use of .iter_graph() which is part of your objectgraph api.
Anyway, no biggie, just want to ask you to include an iteration example in the reference docs to prevent future confusion.
I just wanted to highlight that the ability to iterate over the graph should be more prominent in the reference docs, since it is such a typical use case.
In fact, I thought, this would come intuitively:
but got a
TypeError: 'ModuleGraph' object is not iterable
Then looking how
.report()
was implemented highlighted the use of.iter_graph()
which is part of yourobjectgraph
api.Anyway, no biggie, just want to ask you to include an iteration example in the reference docs to prevent future confusion.